Reference no: EM132886763
OODP101 Object Oriented Design and Programming - Kent Institute
Learning Outcome 1: Demonstrate basic knowledge of object-oriented programming concepts and programming problems
Learning Outcome 2. Analyse and dissect simple design and programming problem
Learning Outcome 3. Implement a well-designed modularized solution to small programming problems
Learning Outcome 4. Develop and/or implement testing schedules
ASSESSMENT DESCRIPTION:
Your task is to design, develop and test a small application which will allow an user to estimate and compare the cost of the different ride sharing companies and find the most expensive and cheapest from them.
Task 1- Design
This stage requires you to prepare documentation that describes the function of the program and how it is to be tested. There is no coding or code testing involved in this stage. Requirements:
1) Read through Task 2: Program Development to obtain details of the requirements of this program.
2) Write pseudocode that describes how the program will operate.
a. All program requirements must be included, even if you do not end up including all these requirements in your program code.
b. The pseudocode must be structured logically so that the program would function correctly.
3) Prepare and document test cases that can be used to check that the program works correctly once it has been coded. You do NOT need to actually run the test cases in this stage; this will occur in Task 3: Testing.
a. Test cases should be documented using a template which is week 6 lecture and tutorial. You may include extra information if you wish. At this stage, the Actual Result column will be left blank. Two test cases per group member are required to gain full marks in this task.
Task 2: Program Development
Using the Design Documentation to assist you, develop a Java program that allows the user to enter their name, approximate kilometres, date and time of travel. Program will estimate the charges for travel according to different ride sharing companies and then compare the charges to give an idea to user about cheapest and expensive ride sharing company.
All requirements require that you follow coding conventions, such as proper layout of code, using naming conventions and writing meaningful comments throughout your program.
Requirement 1:
Display a welcome message when the program starts
• The welcome message should have a row of "*" at the top and the bottom, just long enough to extend over the text. Hint: Use a loop for this.
• The first line of the message should read "WELCOME TO RIDE-SHARING CHARGES ESTIMATOR AND COMPARISON SYSTEM"
• The second line of the message should be blank.
• The third line should read "Developed by" followed by your names and a comma, then "student ID", then your student ids of all group members.
• The fourth line should display "OODP101 Object Oriented Design and Programming"
• The fifth line should display the current date and time of system. You are expected to do a research to complete this task.
• The sixth line should be blank, and the seventh line should be another
row of "*"
Requirement 2
Provide a menu from which the user can select to Enter User Details, Display Charges Under Company 1, Display Charges Under Company 2, Display Charges Under Company 3, Show Report, or Exit System. Company names can be chosen by students from the numerous rides sharing companies available in Australia. This menu should be repeated each time after the user has chosen and completed an option until the user chooses to Exit. The user selects an option by entering the number next to it. If an invalid number is selected, the user is advised to make another selection.
Requirement 3
When the user selects the Enter User Details option, ask user to enter name, approximate KM, day, month and time of travel using 24 hour clock notation (for example:- 9.00 for 9 o'clock in morning, 13.00 for 1 o'clock in afternoon, 14.30 for 2:30 in afternoon) or Return to Main Menu.
Note: We will use these to find out if it is falling in weekend category or not and We will use 2021 as a default year.
All numeric values entered must be positive otherwise program should ask user to enter the value again. After taking inputs, program should show the main menu.
Requirement 4
When the user selects the Display Charges Under Company 1 option, the program should calculate the charges and display a summary of the user details which have been entered, and their charges under Company 1. While calculating, program should check if the date and time falls under peak time category or weekend category and display a message to user confirming if their travel time is falling in any category.
Any time between 7.00 -9.00 am and 16.00-18.00 pm lies under peak time category and final charges should add peak time charges into it.
Saturday and Sundays falls under weekend category. Use the date input value to find out the day on which user wish to travel.
Visit these pages for help:
LocalDate (Java Platform SE 8 ) (oracle.com)
DayOfWeek getValue() method in Java with Examples - GeeksforGeeks
Actual ride sharing companies use many factors to calculate the charges but to keep our system simpler, only few factors will be considered.
The cost structure for Company 1 is listed in the following table. Once the charges have been displayed, it's total value should be saved into an array and the program should return to the Main Menu.
Items
|
Charges
|
Base Charges
|
$5.50
|
$/Km
|
$0.75
|
Peak Time Surcharges per trip
|
$2.50
|
Weekend Surcharges per trip
|
$3.00
|
Note:-It is just a general output and you need to be creative while displaying the final cost to user. Do a bit of research on formatting output.
Requirement 5
When the user selects the Display Charges under Company 2 option, the program should do the same as in Step 4, but using Company 2's cost structure instead, which is listed in the following table, and then return to the Main Menu.
Items
|
Charges
|
Base Charges
|
$4.50
|
$/Km
|
$0.85
|
Peak Time Surcharges per trip
|
$2.00
|
Weekend Surcharges per trip
|
$2.50
|
Requirement 6
When the user selects the Display Charges Under Company 3 option, the program should do the same as in requirement no 4, but using cost structure that will be developed by you and then return to the Main Menu.
Items
|
Charges
|
Base Charges
|
|
$/Km
|
|
Peak Time Surcharges per trip
|
|
Weekend Surcharges per trip
|
|
Requirement 7
When the user selects show report option then program should show the name of cheapest and expensive company and return to main menu.
Requirement 8
When the user selects Exit System, the value of all variables related to the usage should all be reset to 0 or null. A message reporting this, should be displayed, and then program should be terminated with a goodbye message.
Requirement 9
Modularize the code, correctly using method calls and passing data between methods as parameters.
Requirement 10
Use programming standards like proper layout of code, quality of code, indentation and proper comments.
Task 3: Testing
After finishing the development, test your program with the help of test cases developed task 1. In this task, you will be giving the actual output of your program. Make sure you provide screenshots in your report of all actual outcome of all test cases. You don't need to rewrite the test cases in this task but you definitely need to provide the proper numbers so your teacher can identify the relevant test cases from your screenshots.
Attachment:- Object Oriented Design and Programming.rar