Consider an example of online taxi services (i.e., Grab). The company has a list of customers and drivers.
When a customer requests a cab, then a driver accepts and visits the customer for a ride. Which
pattern can be used to implement this scenario? Explain with a UML diagram and also explain the list of
classes and methods involved in this pattern. After that, you must use an IDE (Eclipse) to implement
your design.
Note: You must submit a report and your code.
You are required to implement design patterns using an IDE such as Eclipse. Tasks are following:
• Setup of a project with version control. develop a small application that implements a few examples of
creational, structural and behavioral design patterns.
• Evaluate the use of design patterns for the given purpose specified. Discuss trade-offs/consequences by
applying design patterns.
Note: You must submit a report and full examples code.
The input file called StaffDetails.txt contains a list of records of employees working for USP. The file is generated automatically by the biometric sign-in used by all USP staff and passed to payroll department for calculation of monthly wages. Each record is on a single line and the fields are separated by spaces. The names of the fields are: • Employee ID • Employee Last name • Employee First name • Hourly rate • Hours worked in that month An example record may have the following form but the file can have a maximum of 300 records: H111007 Bond James 40.0 150
A. You must read this file and store the records of employees into appropriate arrays. B. Program should provide user with the following menu. 1) Print all employees’ data. 2) Print all data about of employees which match a given last name that is entered by a user 3) Calculate the net wages for all employees and store it in an array. 4) Display payroll results. 5) Write results to file 6) Exit program.
a2 + b2 = c2
| \
| \
| \
| \
| \ c
a | \
| \
|__ \
|__|______ \
b
2.Create a function that will compute for c given that there are inputs for a and b
3.Create a function that will compute for a given that there are inputs for c and b
4.Create a function that will compute for b given that there are inputs for c and a
SCREEN LAYOUT / DESIGN
(Home Screen when programs runs. User can choose a, b, or c.)
Pythagorean Theorem
Compute for
[a] altitude
[b] base
[c] hypotenuse
Input [a| b |c]:_
(When c is clicked this screen/ layout below will be shown. If Y is inputted in the Try Another control, go back to screen 1 else program will exit.)
Pythagorean Theorem
Function 1 (find c)
Input a: 4
Input b: 3
Computed value of c: 5
Try Another [Y/N]:
(When a is clicked, do function 2, If b is clicked do function 3)
Pythagorean Theorem
Function 2 (find a)
Input c: 5
Input b: 3
Computed value of a: 4
Try Another [Y/N]:
Pythagorean Theorem
Function 3 (find b)
Input c: 5
Input a: 4
Computed value of b: 3
Try Another [Y/N]:
Create a program with three methods/functions, The first one takes in n which is the size of an array then creates and populate the array with student names, the second method takes in n which is the size of an array then creates and populate n by 3 array with student marks(The three marks are for test 1 - 3) and finally a method that takes in the two arrays, calculates the final mark of all test and print out the results as indicated below: The first method should return and array of names and the second should return an array all test marks(i.e. 2d array with 3 columns). The third method in addition should also return an array for all the final marks
Name Test 01 Test 02 Test 03 Final
-------- --------- --------- --------- ---------
Gerry 55 55 55 55
a. Display this to the console:
Bananas: $0.50 each
Strawberries: $.75 each
b. Ask the user what they want to purchase. They will type an 'b' for bananas or an 's' for strawberries.
c. Your program will then ask for the number of bananas or strawberries they wish to purchase (depending on which they selected). The number of bananas cannot exceed 20 and the number of strawberries cannot exceed 10. If the user input exceeds these maximums your program should exit.
d. Your program should then print a report to the console like the following:
Item Qty Price Total
--------------------------
Bananas 4 $0.50 $2.00
Tax(15%): $0.30
Total Cost: $2.30
e. Ask the user for the amount tendered (the amount of money given for the payment). If the amount tendered is over $100 tell the user that there isn't enough change for such an amount and exit.
f. Finally, your program should print another report to the console like the following:
Amount tendered: $10
Change: $7.70
Thank you for shopping with SAI!
Souce code for Android patient tracker application
How do you implement abstraction and encapsulated in c++
Write a C# application that asks the user to input ‘A’ and ‘B’ and prints the sum of squares of all odd numbers between ‘A’ and ‘B’.
Assume that a disk has 512 tracks, with each track having 128 sectors and each sector is of size 8 M bits. The cluster size in this system can be assumed to be as 8 sectors. A file having the name assignmentofsemester1.txt is of size 512 MB. Assume that disk has 128 free - continuous clusters. How can this file be allotted space on the disk? Also show the content of FAT after the space allocation to this file. You may make suitable assumptions.