Subject Code & Title: CSE1OFX Object Oriented Programming Fundamentals
Assessment Type : Individual Assignment
Summary:
A car hire company is an organisation that rents out cars and other vehicles to customers over a set period of time, usually ranging from a couple of days to a couple of weeks.
CSE1OFX Object Oriented Programming Fundamentals Assessment-Australia.
Hiring a car is a common practice for those who have taken a plane to a destination and wish to be able to manage their own transport needs on the ground. It is also becoming increasingly common for residents of a town to avoid the ongoing expenses of owning their own car, and to simply hire a
car locally whenever they need one.
In this assessment task you will create your own Java object-oriented console based (command line) program that will allow a customer to make a partial booking of a vehicle through a car hire company. The car booking system will be implemented with text prompts, standard output, and
ASCII-art drawing where required. You will also need to read data from a file in CSV format.
It is strongly recommended that you read through the entire assessment before commencing any of the tasks.
Scenario:
Carrington Cars has been a player in the car rental market for many years. The organisation prides itself on customer service and has numerous rental centres in convenient locations around the city of Melbart. The organisation has recently seen a significant increase in the number of customers arriving at their centres without securing a booking online. In many cases the staff at centres are overwhelmed, leading to delays in customer support. To streamline the customer service experience Carrington wish for customers to be able to make a partial booking onsite using an in-store console-based system. This partial booking is then finalised by Carrington staff in person with the customer when they become available.
CSE1OFX Object Oriented Programming Fundamentals Assessment-Australia.
Solution design:
Classes
It is expected that the solution will comprise eight classes as outlined below:
Functionality:
It is expected that your solution will have the following functionality:
The user should be presented with an initial welcome message.
Details on the cars to be hired (including daily rates) are to be retrieved from a file named ‘carlist.csv’ (provided) and displayed in a tabular format. An appropriate error message should be displayed if the file is unable to be retrieved.
The program should allow the user to enter a selection to proceed or exit from the program i.e. user to be given the following options:
o Make a booking
o Exit
The program should allow a user to select a car that they would like from the list
The program should include prompts for the user to enter start and end dates of a hire.
These should be:
o A prompt for the year
o A prompt for the month
o A prompt for the day
The program should capture the following details from a user:
o Name
o Email
o Address
There are two types of cars:
o Standard cars (as represented in the Car class). Standard cars have a base daily rate of hire.
o Premium cars (as represented in the Premium Car class, an extension of the Car class). On top of the daily rate, there is an extra cost with the hire of premium cars that being:
The need to pay insurance on the hire of a premium car. Insurance is
calculated as 5% of the daily rate.
The program should calculate the cost of the hire dependent upon:
o Daily rate of hire
o Number of days of hire
o Extra costs for premium cars (as outlined above)
Once all details have been collected from the user, the following information should be displayed to the user as a summary:
o Customer details
o Booking confirmation
o Car hired
o Start and end dates of hire
o Number of days of hire
o Rate per day
o Total cost of hire
Example of Expected Implementation:
Refer to Figure 1 for an example of how the user interface might be presented
Figure 1 shows the following functionality in action:
Display to user of the list of cars available and the total records displayed (drawn from information provided in car list.csv file)
User given initial menu to make a booking or exit the program
User able to select their choice of car (with informative error message if invalid selection is made)
User able to enter the start and end dates of their booking
User able to enter relevant personal details (name and contact information)
Display of summary of booking details
User able to continue with another booking or exit the program
CSE1OFX Object Oriented Programming Fundamentals Assessment-Australia.
Assessment Tasks
Task overview
The first two tasks are focused on the development of a UML diagram while the remaining tasks are based on implementing and testing the program.
It is recommended that you read through the information and requirements of all tasks below prior to commencing any work on your project, and that you complete the structure of your UML diagram before proceeding with later tasks.
Code in your solution should abide by the following best practices:
Error handling for user input.
Consistent code indentation with one level of indentation per block.
Code commenting for each class, all methods, and inline comments
Naming conventions adhered to.
Reasonable code line lengths.
It is also recommended that you review the assessment rubric at the end of this document for a better understanding of the basis on which your submission will be marked.
Tasks 1-2: UML Diagram:
Create a complete UML class diagram using Visio for the Car Rental program.
Task 1: UML Classes
Represent classes on the UML diagram based on the information provided in the class descriptions in Tasks 3-10 below
Task 2: UML Class Relationships
Represent the relationships between classes on the UML diagram including multiplicities (where required) and relationship names.
Tasks 3 – 10: Implementation
Tasks 3-10 describe the classes that together make up the overall program.
Implementation tips for Tasks 3-10:
Try to break down the logic in the assessment into small sections. In general, you should focus on implementing, testing and running small sections of the assessment at a time. This ensures that building blocks for your assessment are sound. Also, if you make any errors in your code, they will be more easily identified and rectified.
If you find that any of the methods are particularly long, you are welcome to introduce additional‘helper’ methods to break up your work.
Make sure that you lodge a support request if you would like any guidance.
Task 3: Menu Display Class
This class manages the retrieval of available cars from a CSV file and displays them to the user.
Menu Display Constructors and methods:
Task 4: Car And Booking Dates Class
This class manages user selections of the car be hired, and the dates they would like to hire.
Car And Booking Dates Instance variables:
Car And Booking Dates Constructors and methods:
Task 5: Car Booking Class
This class does all the work of calculating duration and cost of the hire of a car.
Car Booking Instance variables:
CSE1OFX Object Oriented Programming Fundamentals Assessment-Australia.
Car Booking Constructors and methods:
Task 6: Car Class
This class holds information related to individual cars that are available for hire.
Car Instance variables:
Car Constructors and methods:
Task 7: Premium Car Class
This class is an extension of the Car class. As such, all existing functionality is automatically inherited. This documentation lists additions and differences only.
Premium Car Instance variables:
Premium Car Constructors and methods:
Task 8: Customer Class
This class manages the details of the customer looking to hire a car.
Customer Instance variables:
Customer Constructors and methods:
Task 9: Print Booking Details Class
This class displays details of a finalised booking to the user.
Print Booking Details Constructors and methods:
Task 10: Car Rental Tester Class
This is the overall entry point for the program and has the following functionality:
Controlling access to the main menu, customer details and car booking information.
The main method invokes and captures the values from: display Car List(),
car Selection(…), get Car Booking Date Full(). Values captured are passed as
input parameter to methods and objects instantiated.
Other necessary methods, such as make Booking() and print Booking Details(…) are also invoked from the driver class. Apply necessary iteration to loop the program.
Car Rental Tester Instance variables:
Car Rental Tester Constructors and methods:
Task 11: Test scenario
Download and fill in the Test_Case_Template. docx from the learning portal. The template will be used for testing the date input.
The test scenario should cover the following tests that generate valid outcomes:
1.The duration for hire is greater than zero
2.The duration for hire is 30 days or less for the month of November
…and the following test cases that generate invalid outcomes:
3.The duration for hire is less than zero
4.The duration for hire is 32 days or more for the month of January
5.The duration for hire is 31 days or more for the month of November.
Task 12: Testing the code
After you have finished writing your code, test it by performing the following tasks. Your response must include a screenshot of the output for each of the following. These tasks have a combination of valid and invalid tests. Note that that an invalid entry should catch the validation applied.
1.Test for exception handling with file retrieval through running code after updating file name as follows:
File Name: “cark .csv”
Take a screenshot of the output.
2.Run the code with the following inputs to validate the car number selection:
Car number: 7
If the car selected is not the one of the available cars as displayed, the program should request that the user re-enter the car selection.
CSE1OFX Object Oriented Programming Fundamentals Assessment-Australia.
Take a screenshot of the output
3.Run the code with the following inputs to verify end date is not before start date:
Car number: 2
Start Date: Year: 2020, Month: 5, Day: 1
End Date: Year: 2020, Month: 4, Day: 13
If the end date is before the start date, the program should request that user re-enter information
Take a screenshot of the output
4.Run the code with the following inputs to make a booking for premium car:
Car number: 1
Start Date: Year: 2020, Month: 10, Day: 5
End Date: Year: 2020, Month: 10, Day: 15
Customer details: for customer details use your name, email and address.
Take a screenshot of the output
5.Run the code with the following inputs to make a booking for standard car:
Car number: 5
Start Date: Year – 2020, Month – 9, Day – 1
End Date: Year – 2020, Month – 9, Day – 18
Customer details: for customer details use your name, email and address.
Take a screenshot of the output
Task 13: Coding Conventions
When coding your solution the following coding conventions must be followed.
a) Commenting: Add a class header comment, method header comments, and in line comments where required.
b) Indentation: Consistently indent your code by one level per block. (A good guideline is the Net Beans default of 4 spaces per block.)
c) Naming conventions: Use Title Case for class names, came l Case for variables and UPPER_CASE for constants.
d) Line lengths: Do not exceed the 80 characters per line guideline.
CSE1OFX Object Oriented Programming Fundamentals Assessment-Australia.
Excellent Assignment Help
We Aim At:
- Lowest Price.
- 100% Uniqueness.
- Assignment Fastest Delivery.