Category: Computer science and IT assignments

Object Oriented Programming

You are to build a windows forms application project. This project deals with keeping track of the different budgets a company allocates to each department. As well as keeping track of all the expenses make of a given budget.

You are going to build 3 classes.
1. Base class Budget
2. Child class HomeBudget
3. Child class BusinessBudget
4. in Form1 you would need a listview and a listbox. The listview is used to display all the budgets
5. the listbox is to display all the expenses of the selected budget from the listview

Building the project
1.    Create the project. Set up the Form1_Design to have a Listview, a listbox
2.    Define a class Budget. This class should have
a.    Private fields: _balance (this is the amount of money available or left in the budget
                        to be spent)
              _budgetCode (every budget has an id code by which to access it.
                        Could be a string or an int.
              _expenseList (List<decimal>) this list will contains all the
                          Transactions that took place. Every time an expenditure occurs it is
                          added to this list and the balance is deducted the expenditure made
b.    Constructor and properties for all the fields
c.    Methods: 
public bool MakePurchase(decimal expenseAmount){}
This method is to get the amount of this expense, decide whether the expense will go through or not, then to reduce the current budget balance by this amount,
and to add this expense amount to the _expenseList.
Return true or false according to the decision made.
public void UpdateBudgetBalance(decimal amount){}
This method is to update the balance by either adding the amount to it or subtracting the amount from it.
The amount is not an expense,it is the amount by which to adjust the budget balance.
you decide on what changes you need to make to this method so that you can use it for adding and subtracting the amount to/from balance
public string GetBudgetInfo(){.}
this method is return a string that contains all the information about this budget.

3.    Define a class BusinessBudget that inherits (polymorphically) from Budget.
a.    This class should define an extra private field _department (String). This is the name of the department this businessBudget is allocated to.
b.    Complete the necessary code in this class to make it a functional child

4.    Define a class HomeBudget that also inherits (polymorphically) from Budget
a.    This class should define an extra private field also  _category (String) this describe where this budget is used for such as: Food, Clothing, Entertainment, etc
b.    Complete the necessary code in this class to make it a functional child
5.    In Form1, Create a single List to hold all the budgets (Business and Home)
Define a method PreloadBudgetList that populate the budgetList with at least 5 budgets of each type.
Define also a method Display that takes a single parameter, which is a List of budgets.
This method is to display all the budgets in the listview. The listview should display:
Type of budget, budget code, budget balance
You could find out what type of budget it is and display whether the Department for the business budget, or the Category for the home budget

6.    Add code to the listview SelectedIndexChanged (when you select an item from the listview), display all the expenses of the selected budget in the listbox

7.    Provide a button remove expense to remove the selected expense (in the listbox) from the selected budget (in the listview). Note that it is not enough to remove from the listbox, it must be removed from the selected budget itself. Redisplay the budgets to see that the expense is gone from the budget.

8.    Provide a button (Add new expense), a label (new expense) and a textbox (txtNewExpense) to add this new expense to the selected budget. Redisplay to see the effect. (make the necessary addition to the Budget class to make this operation possible.)

Web & Database Design

Everything else is in the documents.

Project Summary
Description
Your web application project for the Semester is to design and develop a task/chore roster system for shared spaces that allows managers to set tasks, notifies users of their tasks, and allows users to mark tasks as complete.

Upon loading the system should display
Current tasks that need to be done today
The user who is assigned that task
Users should be able to sign up and log in so they can
View their scheduled tasks
Manage their profile/user information
Manage their availability
Manage the types of tasks they can/want to do.
Managers should be able to sign up and log in to:
Manage their profile/manager information
Create and manage different tasks.
Group tasks.
Assign tasks or groups of tasks to users.
Users/managers should be able to choose to link a social media/email/other account, allowing login via that platform, to make logging in easier.
One of the following two special features must also be present:

Email notifications
Users can request that an email notifications be sent to them for current/upcoming tasks.
Users should be able to choose when email notifications are sent
Users should be able to set multiple notifications and/or different notifications per task.
~ OR ~
Calendar Reminder
Users can connect their online calendar to the system (Google Calendar/Outlook)
Tasks automatically added and updated on users’ online Calendars.
Software Requirements
The web application must developed and run in the CS50 IDE.
You should also make regular (at least weekly backups/downloads of your work)
The web application must use NodeJS, Express, and AJAX .
The database must be a SQL database.
Your markup/code must pass W3C Validation and ESLint linting.
You may use other libraries/frameworks not addressed in this course, however your implementation must still demonstrate your understanding of the concepts taught in this course.

Schnel Rose

Question 1

You are employed to a software firm and is assigned to work on coding of the menu section of a library software. Create a structure containing book information such as accession number, name of author, book title and ensure that the software has the capability to flag to determine whether a book was issued or not to a member of the library.
You are therefore required to create a menu in which the following are critical to its functionalities.
    Display book information
    Add a new book
    Display all the books in the library of a particular author
    Display the number of books of a particular title
    Display the total number of books in the library
    Issue a book
N.B. (If we issue a book, then its number gets decreased by 1 and if we add a book, its number gets increased by 1)
                                        [20 marks]

Question 2

You are required to write a C program which will incorporate the concept of functions:
    Declare two one dimensional arrays
    Accept elements to the array via the keyboard
    Add the elements of both stored arrays
    Subtract the elements of both stored arrays                  [16 marks]

Question 3

Create a C program to complete the following task once a number has been accepted from a user:
i.    Determine the factors of the number entered.
ii.    If a factor of a number is a prime a number then it is its prime factor. Identify the factors that are prime factors.
iii.    Display all results to the screen
[16 marks]

Question 4

Write a C program to swap two integer numbers using the concepts of pointers. Use a function called swap () which takes two pointer type arguments and swap them within the body of the function.
                                            [16 marks]

1

Question 5

Write a program to check if the two strings entered by user are anagrams or not. Two words are said to be anagrams if the letters of one word can be rearranged to form the other word. For example, jaxa and ajax are anagrams of each other.
                                            [16 marks]

Question 6

Write a C program to display the shapes below.

*    * * * *    
*    * * *
*    * * 
*    *
*   
——————————————- 1
2 3
4 5 6
7 8 9 10
                                            [16 marks]

Haskell expert needed for assistance in Examen, Real time

I need a Haskell exper that can help me with an exam tomorrow at

11.00 Paris Time https://www.timeanddate.com/worldclock/france/paris

You should be familiar with lambda calculus, infering the most general type of simple haskell programs (Milner algorithm). As well as being able to code well (using high level functions and all the implicit data types haskell have.

If you accept i will give you some excercises so you can test your skill and see if we are a good match.

Desired price is a place holder

Alice Programming Assignment 5

(Use Alice Software)

A common exercise is teaching someone a new language is to show the person familiar objects and ask for the word for that object.  In this exercise, you are to write a simple vocabulary builder to help someone learn the Spanish word for cat.  The scene shows a cat sitting on the grass and three Spanish words (3D text) displayed in front of the cat.  The user is expected to click on the correct Spanish word for cat.  A click on any other object will not work and causes the cat to shake his head “left to right”, “right to left”  indicating that the choice was incorrect).  If the user clicks on “gato” the cat will say “Si Si” with no head shaking. 

Write a function (isGato) that returns true if the word (a 3D text object) selected is “gato” and false otherwise.  Add a congratulation billboard after the correct word is chosen.  Change the opacity of the false word so that it is no longer visible.

Alice Programming Assignment 4

(Please use Alice software)

Create a method that performs an animation appropriate for the ride object selected.(found in attachment)

  Then create a way to start and stop the ride using the “While something is true “EVENT”  (do not use a while statement). Use an object other than the spacebar to stop/start the ride.

Create instructions to inform the user how to start and stop your ride object.  Include comments for each major instruction in your program.

Hints:

The animation for the ride object must not have any loops on its implementation.
The loop action is performed by the “While something is true” EVENT.
There should be only ONE “When the mouse is clicked on something” event or “When a key is typed” event.
There should be at least one method called
The user has to have the ability to start/stop the ride as many times as she/he desires.
Think about a switch: when it is on, the ride starts; and when it is off, it stops.

Alice Programming Assignment 3

(Make sure to have Alice software)

The scene below shows a world with 6 people that speak different languages and are standing around a globe.

https://www.youtube.com/watch?v=dwpRJwxXDpI&feature=emb_title

These languages could include English, Turkish, Spanish, French, Irish and Italian. You can use other languages if you choose. Create an animation where any 2 people in the scene move closer to the globe as they say hello in their own language. Then they should turn around the globe a half revolution (review as seen by method).

Each person should then change his/her position to where the other person was standing. Your code should use just one method named greeting. This method will have 4 parameters, 2 for the people, and 2 for the foreign words.

In my First Method, you should call the greeting method 3 times.

These languages could include English, Turkish, Spanish, French, Irish and Italian. You can use other languages if you choose. Create an animation where any 2 people in the scene move closer to the globe as they say hello in their own language. Then they should turn around the globe a half revolution (review as seen by method).

Each person should then change his/her position to where the other person was standing. Your code should use just one method named greeting. This method will have 4 parameters, 2 for the people, and 2 for the foreign words.

In my First Method, you should call the greeting method 3 times.

The setup scene is in the attachment
when finished upload the finished scene

Alice Programming Assignment 2

(Please have Alice software)

The Tortoise and the Hare

We all know the story about The Tortoise and the Hare. For this project we will use the Tortoise and Hare story line. 

In our story, the bunny was confident that he would win the race, so he did not work hard and lost the race. The bunny solicited the hare to find out why the bunny lost the race. The hare shared his experience with the bunny, now the  bunny knows he needs to train harder to win the race.  In our story the bunny will win the race.

Use the initial scene in the  Attached File section.

Write a program to make the bunny hop over the two obstacles, then hop on top of  the third position of the trophy podium, and finally he hops on the first place podium. Turn the bunny’s feet backward and forward to make it look like a hop. Use the height and distance functions to guide the upward and forward movements, respectively. During the upward and forward movement the bunny is moving forward toward the trophy.

Make sure that the tortoise reaches the finish line after the bunny, by increasing the duration parameter of the move function  Once both the tortoise and bunny reach the podium, they should turn and face the camera, and the bunny raises his arms and say, “I won!!”  Include comments for each major instruction in your code.

Alice Programming Assignment

(Please Have Alice software)

Zeus Modification

Recreate the Zeus world.  In this world, a philosopher has been zapped by lightning and is scorched to show he has met a tragic ending.  However, the philosopher is still in the scene and the user can zap him again. 

Revise the program to allow the user to zap each philosopher.  Make each zapped philosopher fall down below the ground, where he can’t be mouse-clicked again.

Include comments for each major instruction in your program.

-Download the initial scene for the project
-Create the methods and events
-Once you have it ready, then perform the modifications  in this project
-Each philosopher that is zapped should fall below the ground where he can’t be zapped again
-The Lightning Bolt should not be seen as it returns to the cloud
-The sound should play

Java-Processing-Search and Sort

Write the code for the following methods:
Selection sort is to repetitively pick up the smallest element and put it into the right position:
Find the smallest element, and put it to the first position.
Find the next smallest element, and put it to the second position.
Repeat until all elements are in the right positions.

Insertion sort maintains a sorted sub-array, and repetitively inserts new elements into it. The process is as following:
Take the first element as a sorted sub-array.
Insert the second element into the sorted sub-array (shift elements if needed).
Insert the third element into the sorted sub-array.
Repeat until all elements are inserted.

Bubble sort repetitively compares adjacent pairs of elements and swaps if necessary.
Scan the array, swapping adjacent pair of elements if they are not in relative order. This bubbles up the largest element to the end.
Scan the array again, bubbling up the second largest element.
Repeat until all elements are in order.

Recursive Sort Algorithms
Quick Sort
Quick sort is to partition the array around one element and then sort each part recursively.
Pick up one element as the pivot
Move all elements less than the pivot to the left, and all elements greater than the pivot to the right
Apply the above steps on both parts

Merge Sort
Consider the problem of sorting an array of numbers in order. Merge sort is to recursively divide the array in half, and then recombine the sorted subarrays.
Divide the array in half.
Recursively divide until each subarray has only one element.
Merge the sorted subarrays.

Use the following algorithms/pseudo code as a starting point:
int search(int [] arr, int item)
{
For (int i = 0; i< arr.length; i++)
    {
        If (item == arr[i])
        {
            Return i;
        }
}
  return -1;
}

Void bubbleSort(int[] arr)
{
  Int swaps = 1;
    While (swaps > 0)
{
  swaps=0;
    For ()
      If (arr[i]> arr[i+1])
{
          swap(arr, i, i+1);
swaps++;
}
}
}

void quickSort(int [] arr, int low, int high) //recursive method
{
  Int pivot = (low+high)/2;
  If (high <=  low)
        return;
  // put the higher values above pivot – move pivot down

// put the lower values below pivot – move the pivot up

If (pivot > low)
  quickSort(arr, low, pivot-1);
If (pivot < high)
  quickSort(arr, pivot+1, high);
}

void mergeSort(int[] arr, int low, int high) //recursive method
{
  Int pivot = (low+high)/2;
  If (pivot > low)
    mergeSort(arr, low, pivot);
  If (pivot < high)
    mergeSort(arr, pivot+1, high);

// merge 2 arrays

}

Void swap( int[] arr, int to, int from)
{
    Int temp = arr[from];
    Arr[from] = arr[to];
    Arr[to] = temp;

}

void selectSort(int [] arr)
{
    for(int i=0; i< arr.length; i++)
{
  Int min = i;
    For (int j=i+1; j<arr.length-1; j++)
      If (arr[min] > arr[j])
          Min = j;
  swap(arr, i, min);}
}

void insertSort(int[] arr)
{
    For (i=1; i <arr.length; i++)
{
      For (j=0; j<i; j++)
        {
            If (arr[i] < arr[j])
                shiftUp(arr, arr[i], j, i) ;

}

}

}

int binSearch(int [] arr, int item)
{
  return binSearch(arr, item, 0, arr.length-1);
}

int binSearch(int [] arr, int item, int low, int high)
{
  int pivot = (low+high)/2;
If (arr[pivot] == item)
Return pivot;
If (arr[pivot] < item)
binSearch(arr, item, low, pivot-1);
else
binSearch(arr, item, pivot+1, high);
  return -1;
}

void shiftUp(int[]arr, int value, int pos, int end)
{
    For (i=end; i>pos; i–)
{
    Arr[i] = arr[i-1];
}
Arr[pos] = value;
}

The result should show a comparison between the different methods and the speed at which the result is outputted.