Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Mates Rates Rent-A-Car ( just do the part a) using visual studio code (C#) Criteria sheet - Par A Example supplementary files (readme.pdf) Example supplementary

Mates Rates Rent-A-Car ( just do the part a) using visual studio code (C#)

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

Criteria sheet - Par A

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

Example supplementary files (readme.pdf)

image text in transcribed

image text in transcribed

image text in transcribed

Example supplementary files (class-diagram.pdf)

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

Assignment test data

image text in transcribed

customer.csv

image text in transcribed

fleet.csv

image text in transcribed

rentals.csv

image text in transcribed

Statement of completeness (checklist)

image text in transcribed

image text in transcribed

image text in transcribed

Please let me know if there's any question ! Thanks !

Overview - Mates Rates Rent-a-Car Weighting: Part A - 25%; Part B; 25% (total 50%) Assessment type: Individual Specification version: 1.0 (08.12.20) Introduction This assignment aims to give you real problem-solving experience, like what you might encounter in the workplace. You have been hired to complete a prototype for a project that has not been fully specified at this stage. There is some supporting documentation to the project in addition to this document. You are required to deliver a working prototype by the required date. The Task For this assignment your task is to develop a program for a car rental company called Mates Rates Rent-a- Car (MRRC) to help the operators of the company more efficiently manage their fleet of carsand their customers. The operators of MRRC require the following functionality: 1. Enter a new customer 2. Modify an existing customer 3. Delete a customer (only if not currently renting a vehicle) 4. Enter a new vehicle 5. Modify an existing vehicle 6. Delete a vehicle (only if not currently rented) 7. Search for a suitable car based on a customer's request (see the search capabilities section) 8. Rent a car to a customer 9. Return a car from a customer 10. Produce a report (to the screen) of all rented vehicles. Vehicles have various traits and come in particular classes (or grades). A Vehicle class can define the shared properties and methods of all cars and support specialised properties and methods. For instance, luxury vehicles may have GPS and a sunroof, and commercial vehicles may have a diesel engine. Including the aforementioned properties, vehicles can be characterised by: 0 Registration (e.g. 123ABC) Make (e.g. Hyundai, Mitsubishi, Ford) Model (e.g. Excel, Lancer, Falcon) Year Grade (e.g. Luxury, Commercial, etc.) Number of Seats (from 2 to 10) Transmission Type (Automatic/Manual) Fuel Type (Petrol/Diesel) Inclusion of GPS Inclusion of Sunroof Daily Hire Rate Colour Customers also have various traits. A Customer class can define the shared properties and methods of all customers. Customers should have: Identification Number Title (e.g. Mr, Mrs, Dr, etc.) First Name Last Name Date of Birth (dd/MM/yyyy) Two container classes as described below should be written to maintain collections of vehicles and customers: Fleet: Manages the rental of vehicles. The fleet class should load the vehicle fleet and rental list from file on start-up. This class should be based on an array of Vehicle objects. It should support operations on the fleet (e.g. add/modify/delete) including rental based operations (e.g. rent/return car to/from customer). CRM: Manages the collection of customers. The CRM class should load the customers from file on start- up. This class should be based on an array of Customer objects. It should support operations on the Customer (e.g. add/modify/delete). Both the Fleet and CRM classes should save their data to disk when the program is closed by the operator. Submission stages This assignment is split into two distinct parts for submission described below. You are encouraged to start with Part A and modify your code after the due date to produce Part B. You will be graded only on the functionalities mentioned in each part. PART A (25%): Customer and Vehicle Management This part must have all customer and vehicle management functionality complete (functionalities 1 through 6). This includes the command line user interface and the background functionality. You are free to implement features of Part B although you will not be awarded any marks for it until it is due. PART B (25%): Rental Management This part must have all rental management functionality complete (functionalities 7 through 10 on page 1, as well as the rental functionalities in 3 and 6). This includes the command line user interface and the background functionality. Command-line interface Command-line interface You are required to create a command-line user interface for this program. The design of this Ul is largely up to you; however, it should be functional and relatively simple, and should allow operators to complete all required functions. The program must make sure that data is entered correctly and provide feedback to the user when necessary (e.g. when entering the vehicle registration of a new vehicle the program must ensure that the registration is unique (no duplicates allowed) and is in a valid format: three number followed by three letters). You can assume that data on disk (i.e. read from files) is always valid. Besides the vehicle registration restriction above, the program must make sure that the customer ID is unique. You may want to implement this by automatically generating a unique customer ID (for example, keeping track of the current highest customer ID and incrementing by one). A note on the processes of renting a vehicle to a customer. When renting the user should be able to specify the duration of rental (in days), and the total cost should be calculated accordingly (based on the daily rate). Rented vehicles cannot be rented again until returned. The system should allow the customer to return a vehicle at any time. A few important notes on the general functionality of user interface: 1. All user inputs should be treated as case-insensitive to improve usability of the program 2. All inputs should pass necessary validity checking, that is, user inputs meet specified data format (e.g. a string for name, 'dd/MM/yyyy' formatting for dates etc). 3. If any input is wrong, detect and prompt correction suggestions without crashing the program. For example, show an error or warning message like this: WARNING: The input 'O' was unrecognised. Please enter a character between 'a' and 'f. 4. Reserve some special keys e.g. ESCAPE for exiting the program, h for going back to the home menu (main menu), q for exiting the current menu and going back to the parent menu etc. You need to 4. Reserve some special keys e.g. ESCAPE for exiting the program, h for going back to the home menu (main menu), q for exiting the current menu and going back to the parent menu etc. You need to document these special keys in your brief user manual. Example command-line user interfaces are released together with this specification (see Appendix). It is recommended that you use these examples as a basis for your program although you are free to deviate, so long as you specify how to use your program in the submission report. Search capabilities The search capabilities of the MRRC program offers various levels of functionality. The following are just some examples. Many more queries of the same types are possible. There could be more/other attributes in queries. Queries are in free text format, but only allow attribute values, and the operators AND, OR, and (). Notes: Queries should not be case sensitive Fields with spaces should be encapsulated in double quotes (e.g. Fiero 2M4 should be searchable via "Fiero 2M4") Example queries: 1. All (leave blank and hit enter) 2. Single attribute query (assume each attribute name is unique in the entire system) Red Family 8-Seater GPS 3. A choice between two attributes (disjunction) Family OR Luxury Red OR Blue GPS OR 8-Seater 4. A combination of two attributes (conjunction) Red AND Family GPS AND Luxury 5. A choice between any number of attributes (disjunction) Economy OR Family OR Luxury Red OR Blue OR Green OR Purple 6. A combination of any number of attributes (conjunction) Red AND Luxury AND GPS GPS AND 5-Seater AND Red AND Commercial 7. A combination of any number of attributes, using both AND and OR with AND having the same priority (precedence) as OR Economy OR Family AND 5-Seater Red OR Blue OR Green OR Purple AND GPS 8. A combination of any number of attributes, using AND and OR with AND having a higher priority than OR, supporting parentheses to resolve priority ((GPS AND Sunroof) OR (Red OR Green)) AND Commercial OR Luxury Class specification In the accompanying class specification document, you are provided with a partial specification of the classes required to create a prototype for the MRRC program. For all classes you may implement additional private methods and parameters. You may also implement additional public methods and parameters where appropriate and necessary to complete the functionality. Even if you decided not to use this class specification (for whatever reason), please read it in its entirety, it has important information about the data requirements for this project. Recommended approach Tackling a large project such as this assignment may initially seem daunting, however breaking it down into smaller tasks that can be implemented and tested will make the task much more manageable and is an important skill for professional practice. You will develop this assignment as a bottom-up implementation exercise. This means that you will work based off a specification that has already been prepared and implement classes and methods, one by one, first implementing those classes and methods that don't rely on other classes to operate, then implementing the classes and methods that rely on those and so forth. Note that the user interface is often developed separately from the detailed functionality, by different programmers, as a team effort (although you will be working individually this time). It is here where the value of OOP is demonstrated. Once you have completed your command line user interface, a good place to start is the definition of the CRM and Customer classes (including file 1/0). What to submit For this assignment, you are required to submit a zip file - via Blackboard - containing the following items: ALL your C# files (.cs) A brief user manual A statement of completeness file (from the template on Blackboard) A self-filled CRA A class diagram of your code This is mandatory for both parts of the assignment. Below is a description of each of the non-code items required for submission. Plan for time to test your submission and complete all of this documentation, it is best done over the course of the project, not all at the end. You will be awarded points for completing each of the following items in full, make sure you complete and submit them all to maximize your grade 1. Write a brief user manual (README) and place it in the Documentation folder of the project. Briefly explain how to run your program and its main functionalities. A sample user manual using Markdown is provided, as well as an equivalent pdf version. You can use pure text or Word format for this user manual. 2. Prepare the statement of completeness and place it in the Documentation folder of the project. Name your file as "Statement-of-Completeness_n12345678" where n12345678 is your student number. This statement of completeness will need to accurately state the functionality which has been implemented. A template with instructions for the statement of completeness is provided with this file on Blackboard. You need to fill in the template provided. 3. Fill out the CRA yourself and place it in the Documentation folder of the project. The process of filling out the CRA yourself is critical in ensuring that you understand the task in full and you are doing your best to meet the requirements. We will not be using your CRA as a marking tool for this assessment, it is purely for your own benefit. 4. A class diagram of your code. The process for completing this will be covered during class. Criteria Sheet - Part A (25%) If you have used or drawn inspiration from others' code, you must include a reference to the original author or source in the method comments. You must give credit where it is due to protect yourself against plagiarism accusations. You are not allowed to reuse code for the entire project. You must fill this CRA (along with the SoC, transcript and documentation) and upload it as part of your submission. Failure to do so will result in a loss of points from your final marks for each part. The marks indicated in the tables below are the highest mark you can get for a specific section. You may receive partial marks based on your delivery quality. Your final score (as a percentage of your final grade for this unit) for each part will be calculated using the following formula: Points Scored Final Score = Available Points x Weighting Criteria tables Submission Items Each of the items below are required for submission, failure to submit any of these items will result in a loss of points. If any of the items are submitted but left incomplete you will lose a portion of the amount listed on the right of the table. The amount lost will be proportional to the amount of incomplete work. Awarded Possible Project Documentation 2 Statement of Completeness 2 Program Transcript 2 Self-filled CRA 2 Class Diagram 2 Total 10 Functionality File 1/0 To gain points for this section, it must be clear that your program can read and write to and from the provided samples files. To demonstrate the write functionality your program must be able to add/remove/modify the vehicles/customers data and save it to the appropriate file. To demonstrate the read functionality your program must be able to correctly interpret data from the files before and after writing. Awarded Possible Customer data can be read from a file (customers.csv) 3 Vehicle data can be read from a file (vehicles.csv) 3 Customer data can be written to a file (customers.csv) 3 Vehicle data can be written to a file (vehicles.csv) 3 Total 12 Functionality - User Interface To gain points for this section, the following features must be easily accessible and testable via the console user interface. All of the following functionalities must be demonstrated in the program transcript. Awarded Possible CRM: View list of customers 2 CRM: Add customer: Functionality 3 CRM: Add customer: Unique customer ID validation 1 CRM: Add customer: Other input field validation 1 CRM: Modify customer: Functionality 3 CRM: Modify customer: Unique customer ID validation 1 CRM: Modify customer: Other input field validation 1 CRM: Remove customer: Functionality 2 Fleet: View list of vehicle 2 Fleet: Add vehicle: Functionality 3 Fleet: Add vehicle: Unique registration validation 1 Fleet: Add vehicle: Other input field validation 1 Fleet: Modify vehicle: Functionality 3 Fleet: Modify vehicle: Unique registration validation 1 Fleet: Modify vehicle: Other input field validation 1 Fleet: Remove vehicle: Functionality 2 Total 28 Code Quality To gain points for this section, you must maintain good code quality throughout your whole project. While following the CAB201 C# Coding Style Guide will help you meet these criteria, you do not have to follow it to the letter (at the least you must be consistent and clear). Important: Your target reader is a programmer, not an absolute beginner. Awarded Possible Maintained, consistent and clear standard in variable, method and class naming 2 Magic number have been replaced with appropriately named constants. 1 Consistent and appropriate white spacing, line length, indentation, and organisation of files within the project (ie. not one single Program.cs file - you should have other files to organise your classes) 2 Class header comment at beginning of each class, comment before every method, and in-line comments to explain complex or not easily discernible code. In-line comments are not excessive. 3 Methods are single purpose and clear, and code is reasonably efficient and succinct. 2 Total 10 Presentation To gain points for this section, you must ensure your user interface is of a high quality. Your interface does not need to be flashy or overly visually appealing - instead you should focus on making it clear, intuitive and easy to use. Awarded Possible Incorrect input is handled appropriately and clearly. 2 The overall design is clean and uncluttered. Data is displayed clearly. 2 All necessary functionality of the UI is clear, easy, and quick to access. 4 Special cases are handled nicely (e.g. when the user requests a list of vehicles and there are no vehicles, a message is displayed rather than just an empty list of vehicles). 2 Total 10 Bonus Criteria (+) To gain points for this section, you must implement advanced OOP concepts in your code. You have freedom in where/how these concepts are implemented in your code. Ask the teaching team if you require some advice or guidance. Awarded Possible 5 Project code exhibits at least one good use of encapsulation (separate from the classes detailed in the class diagram). Recommended Approach: There are many opportunities to implement some level of encapsulation in your code, some good examples are: A Table class which can store and print formatted data for a table. A Menu class which can control program flow. Project code exhibits at least one good use of inheritance. Recommended Approach: The Vehicle class can be inherited by four distinct subclasses, each categorised by the vehicle grades (Economy, Family, Luxury, Commercial). Appropriate constructors can be set which make use of the default values of the different classes. 5 Total 10 The details in this user manual have been left vague and/or incomplete by design. Please ensure your user manual is complete and descriptive enough for your tutor to follow for marking purposes. This program has many functionalities, and will allow the operator to do a number of processes to manage a vehicle rental management system. It is important to follow the instructions detailed in the manual carefully so that the program behaves as expected. Building and running To build the code for this program, open the folder containing the .csproj file in Visual Studio Code. Press F5 to build and run the project. This will open a new console window from which the program will run. You should be met with the following greeting message, followed by the main menu: ### Mates-Rates Rent-a-Car Operation Menu ### You may press the ESC key at any menu to exit. Press the BACKSPACE key to return to the previous menu. Custom Files By default, the program data is stored within appropriately labelled comma-separated value (CSV) files located in Data folder (inside the root folder). Namely: fleet.csv - Vehicle fleet data customers.csv - Customer information data rentals.csv - Vehicle and customer rental data If the user wishes to use files stored elsewhere they should be specified as command line arguments. To do this right-click the MRRC project in the Solution Explorer and, select the Debug tab in the newly opened file and paste the following into the command line arguments text box: --fleet=path/to/fleet.csv --rentals=path/to/rentals.csv -- customer's path/to/customers.csv Note that you will need to replace the dummy paths with paths to the files you wish to use in the program (relative or absolute). Once you have done this, you man run the program as described before. Program Usage This program is comprised of a hierachal set of menus. You will start at the Main Menu, and depending on your choice you will be sent to different sub-menus, all focused on a specific aspect of the system. As specified in the greeting message you may press the ESC key at any menu to exit the program, and the BACKSPACE key to return to the previous menu. Main Menu When you enter the program the following main menu will be displayed after the greeting message: Please enter a character from the options below: a) Customer Management b) Fleet Management c) Rental Management After you input a character (a, b or c) the program will enter the corresponding sub-menu (there is no need to press enter on any of the menus, the program is expecting only a single character). Customer Management Menu When you enter a on the Main Menu the following menu will be displayed. You will note that each of the options on the menu correspond to a core process relating to the mangement of customers. Please enter a character from the options below: a) Display Customers b) New Customer c) Modify Customer d) Delete Customer After you input a character (a, b, c or d) the program will enter a small prompt based sequence to assist you in completing your task. Display Customers This sequence will very simpily draw a table to the console containing details for every customer in the CRM. It may look something like this: +--+ |ID|Title FirstName LastName Gender | DOB 10 IMS Holly Hutson Female | 07/01/1990 11 IMS Beverley Woodrow Female | 08/07/19871 12 Mr Albert Audra Male (11/12/1930 13 Mrs Ami Berry Female 09/01/1999 14 Count|Fredrich von Trapp | Male 14/03/1997| +-------+ CLASS DIAGRAMS The following class diagrams are only a suggestion. You are free to modify or redesign the classes if you wish. For example, you may want to implement additional public methods in the Vehicle class which assist in the search functionality. For each class, getter and setter functions may be replaced with appropriate properties in this case they would all be public instead of private as they may appear in the class diagram). In general, property getters and setters are left as defaults. While the class diagram below will likely make up the bulk of the backend of your project, you are encouraged to implement your own classes when applicable. In the sample solution for this project, as many as 15 classes and enumeration types were created (although you are certainly not expected to reach that number)! public class Vehicle Vehicle - vehicle Rego: string - make: string - model: string -year: int -vehicleGrade: VehicleGrade - num Seats: int - transmission: Transmission Type fuel: Fuel Type GPS: bool - Sun Roof: bool - dailyRate: double -colour:string + ToCSVString() + ToString() + GetAttributeList() The vehicle class should have appropriate getter and setter methods for each field, or properties can be used. VehicleGrade, Fuel Type, and Transmission Type should be appropriately defined enumeration types. The vehicle class should have appropriate getter and setter methods for each field, or properties can be used. VehicleGrade, Fuel Type, and Transmission Type should be appropriately defined enumeration types. Method Descriptions // This constructor provides values for all parameters of the vehicle. public Vehicle(string registration, VehicleGrade grade, string make, string model, int year, int numSeats, TransmissionType transmission, Fuel Type fuel, bool GPS, bool sunroof, double dailyRate, string colour) // This constructor provides only the mandatory parameters of the vehicle. Others are // set based on the defaults of each class. // Overall defaults: // 4-seater // Manual transmission Petrol fuel // - No GPS // - No sun-roof // - $50/day // Black // Economy vehicles: 1/ // - Automatic transmission // Family vehicles: // - $80/day // Luxury vehicles: // - Has GPS - Has sun-roof - $120/day // Commercial vehicle: // - Diesel fuel // - $130/day public Vehicle(string registration, VehicleGrade grade, string make, string model, int year) // This method should return a CSV representation of the vehicle that is consistent // with the provided data files. public string ToCSVString() // This method should return a string representation of the attributes of the vehicle. public override string ToString() // This method should return a list of strings which represent each attribute. Values // should be made to be unique (e.g. numSeats should not be written as 4 but as 4 // Seater, sunroof should not be written as "True but as "sunroof or with no string // added if there is no sunroof). Vehicle rego, grade, make, model, year, transmission // type, fuel type, and colour can all be assumed to not overlap (i.e. if the make // "Mazda exists, Mazda will not exist in other attributes). You do not need to // maintain this restriction, only assume it is true. You do not need to add the daily // rate to this list. public List GetAttributelist() An alternative approach can be taken to the Vehicle class for additional marks. In this approach, the Vehicle class should be an abstract class, and each grade of car (Economy/Family/Luxury/Commercial) should extend the Vehicle class. Appropriate constructors should be set which make use of the default values of the different classes. public class Customer Customer - customerlD: int - title: string - firstNames: string - lastName: string - gender: Gender -DOB: Date Time + ToCSVString() +ToString() The vehicle class should have appropriate getter and setter methods for each field, or properties can be used. Gender should be an appropriately defined enumeration type. // This constructor should construct a customer with the provided attributes. public Customer(int ID, string title, string firstName, string lastName, Gender gender, DateTime DOB) // This method should return a CSV representation of the customer that is consistent // with the provided data files. public string ToCSVString() // This method should return a string representation of the attributes of the customer. public override string ToString() public class Fleet Fleet - vehicles: List - rentals: Dictionary - fleetFile: string - rentalFile: string + AddVehicle() + RemoveVehicle() + GetFleet() +IsRented() +IsRenting() + RentedBy() + RentVehicle() + ReturnVehicle() + Save VehiclesToFile() + SaveRentalsToFile() + Load VehiclesFromFile() + LoadRentalsFromFile() You may adjust some private variables or methods if they better suit your approach. For example, you may prefer to take a different approach to the Dictionary with the vehicle registration and customer ID for maintaining which vehicles are being rented. The methods needed to implement full search functionality have not been specified here. It is up to you to come up with your own approach. You may find it useful to include a destructor for saving the files when the Fleet instance is destroyed. // If there is no fleet file at the specified location, this constructor constructors // an empty fleet and empty rentals. Otherwise it loads the fleet and rentals from the // specified files (see the assignment specification). public Fleet(string fleetFile, string rentalsFile) // Adds the provided vehicle to the fleet assuming the vehicle registration does not // already exist. It returns true if the add was successful (the registration did not // already exist in the fleet), and false otherwise. public bool AddVehicle(Vehicle vehicle) // This method removes the vehicle with the provided rego from the fleet if it is not // currently rented. It returns true if the removal was successful and false otherwise. public bool RemoveVehicle(string registration) // This method returns the fleet (as a list of Vehicles). public List GetFleet() // This method returns a subset of vehicles in the fleet depending on whether they are // currently rented. If rented is true, this method returns all rented vehicles. If it // false, this method returns all not yet rented vehicles. public List GetFleet(bool rented) // This method returns whether the vehicle with the provided registration is currently // being rented. public bool IsRented(string registration) // This method returns whether the customer with the provided customer ID is currently // renting a vehicle. public bool IsRenting(int customerID) // This method returns the customer ID of the current renter of the vehicle. If it is // rented by no one, it returns -1. Technically this method can replace IsRented. public int RentedBy(string registration) // This method rents the vehicle with the provided registration to the customer with // the provided ID, if the vehicle is not currently being rented. It returns true if // the rental was possible, and false otherwise. public bool RentVehicle(string registration, int customerID) // This method returns a vehicle. If the return is successful (it was currently being // rented) it returns the customer ID of the customer who was renting it, otherwise it // returns -1. public int ReturnVehicle(string registration) // This method saves the current list of vehicles to file. public void SaveVehiclesToFile() // This method saves the current list of rentals to file. public void SaveRentalsToFile() // This method loads the list of vehicles from the file. private void LoadVehiclesFromFile() // This method loads the list of rentals from the file. private void LoadRentalsFromFile() public class CRM CRM customers: List GetCustomers() // This method returns the customer who matches the provided ID. public Customer GetCustomer(int ID) // This method saves the current state of the CRM to file. public void SaveToFile() // This method loads the state of the CRM from file. public void LoadFromFile() Assignment test data Attached Files: customers.csv (357 B) fleet.csv (767 B) rentals.csv (65 B) F G DOB A B C D E 1 ID Title FirstName LastName Gender 2 0 Ms Elizabeth Franklin 26/09/1995 3 1 Miss Finley Sartini 25/04/1965 4 2 Mr Miron Descoteaux 4/06/1983 5 3 Mx Tekla Muhammad 17/12/1989 6 4 Mrs Valentina Waters 27/04/1979 7 5 Mr Azarel Kristiansen 1/06/1976 8 6 Lord Herman Dirksen 22/05/1959 9 7 Mrs Emel Gabor 31/03/1976 10 8 Lady Kalpana Rothenberg 6/02/1966 11 9 Dr Amos Allaway 10/09/1957 12 10 Dr Amos Allaway 9/10/1957 13 14 15 16 17 A1 : X Registration A B C D E 1 Registratic Grade Make Model Year 2 851VOJ Economy Pontiac Fiero 2M4 1985 3 169FBE Economy Pontiac Fiero 2M4 1985 4 602WZ Economy Pontiac Fiero 2M4 1987 5 993QAN Commerci Mitsubishi 3000 GT VI 1991 6 509XRK Commerci Dodge Dakota 2002 7 471XBI Luxury Chevrolet Tahoe 1996 8 682GWJ Commerci Audi A4 1997 9677UIA Economy Audi S4 2004 10 519YUY Family Dodge Durango 2006 11 12 13 14 F. G . NumSeats Transmissi Fuel 2 Manual Petrol 2 Manual Petrol 2 Manual Petrol 2 Manual Petrol 4 Manual Diesel 8 Automatic Petrol 5 Manual Petrol 5 Manual Petrol 7 Automatic Diesel GPS FALSE FALSE FALSE FALSE TRUE L SunRoof DailyRate Colour FALSE 37.1 Black FALSE 48.8 Black FALSE 37.9 Red FALSE 37.8 Red FALSE 45.5 Blue TRUE 38 Black FALSE 46.1 Blue FALSE 43.3 Blue TRUE 46.8 Blue TRUE FALSE FALSE TRUE A1 fx Registration C D E F G H 1 2 3 B 1 Registratid CustomerID 2 602WZ 0 3 677UIA 6 4 471XBI 2 5 851VOJ 3 6 7 8 9 10 11 Statement of Completeness (Template): Mates Rates Rent-a-Car This statement of completeness will need to accurately state the functionality which has been implemented. Use this checklist of program functionality as you complete your project. Student Name: Student ID: Functionality Checklist In the following section, you are required to mark which functionality you have implemented. In the column on the right please mark 'Y' where you have completed this functionality, and 'N' where you have not. Please fill in any additional text boxes requested, and please note any limitations or bugs in the box at the end of each section. You may expand the table if you need more room for comments. File I/O File location Read If your solution does not load files from the specified location in the specification, please note here where the files are stored. Customers: Data/customer.csv Fleet: Data/fleet.csv Rentals: Data/rentals.csv CRM Y/N Fleet Y/N Rentals (must meet above criteria first) Y/N CRM (must be able to read CRM first) Y/N Fleet (must be able to read CRM first) Y/N Rentals (must meet above criteria and read Rentals first) Y/N Please note any limitations, bugs, logical errors, and/or run-time errors here Write Comments Please note that your assignment must be able to load the files in the same format as provided in the example files. CRM And Fleet Functionality CRM Y/N Y/N Y/N View customers Add customer With validation - all fields are valid options, no repeated customer ID Remove customer With validation - only if not renting vehicle Edit customer With validation - same as add View vehicles Add vehicle With validation - all fields are valid options, and there is no repeated registrations Remove vehicle With validation - only if not already being rented Edit vehicle With validation - same as add Extra marks - implemented vehicle classes with inheritance Please include a brief explanation of the inheritance here if implemented: Y/N Y/N Y/N Y/N Y/N Y/N Y/N Fleet Y/N Y/N Y/N Y/N Y/N Renting View rented vehicles report. This should show the vehicle, Y/N customer, and the daily cost of the rental. Rent vehicle. This should show the total cost of the rental. Y/N With validation - only if vehicle and customer exist, vehicle is not already being rented, and customer is not already Y/N renting Return vehicle. Y/N With validation - only if vehicle was being rented by the Y/N customer Please note any limitations, bugs, logical errors, and/or run-time errors here Please briefly note any changes from the specification of the classes and methods, and your reason for these. Comments Changes from spec. Search Functionality Any Possible to Query - Simple Inter- mediate Y/N - Be able to see any unrented vehicle in the fleet Single attribute query Y/N Example: o Red A choice between two attributes (disjunction) Y/N Example: o Family OR Luxury A combination of two attributes (conjunction) Y/N Example: o Family AND Luxury A choice of any number of attributes (disjunction) Y/N Example: o Family OR Luxury OR Red A combination of any number of attributes (conjunction) Y/N E.g.: o Luxury AND Red A combination of any number of attributes, using both AND and Y/N OR, where the operators AND and OR should have the same priority (precedence) E.g.: o Economy OR Family AND 4-Cylinders A combination of any number of attributes, using AND and OR, with Y/N AND having a higher priority than OR, supporting parenthesis to resolve priority E.g.: ((GPS AND Sunroof) OR (Red OR Green)) AND Commercial OR Luxury Please note any limitations, bugs, logical errors, and/or run-time errors here Advanced Ninja Comments Overview - Mates Rates Rent-a-Car Weighting: Part A - 25%; Part B; 25% (total 50%) Assessment type: Individual Specification version: 1.0 (08.12.20) Introduction This assignment aims to give you real problem-solving experience, like what you might encounter in the workplace. You have been hired to complete a prototype for a project that has not been fully specified at this stage. There is some supporting documentation to the project in addition to this document. You are required to deliver a working prototype by the required date. The Task For this assignment your task is to develop a program for a car rental company called Mates Rates Rent-a- Car (MRRC) to help the operators of the company more efficiently manage their fleet of carsand their customers. The operators of MRRC require the following functionality: 1. Enter a new customer 2. Modify an existing customer 3. Delete a customer (only if not currently renting a vehicle) 4. Enter a new vehicle 5. Modify an existing vehicle 6. Delete a vehicle (only if not currently rented) 7. Search for a suitable car based on a customer's request (see the search capabilities section) 8. Rent a car to a customer 9. Return a car from a customer 10. Produce a report (to the screen) of all rented vehicles. Vehicles have various traits and come in particular classes (or grades). A Vehicle class can define the shared properties and methods of all cars and support specialised properties and methods. For instance, luxury vehicles may have GPS and a sunroof, and commercial vehicles may have a diesel engine. Including the aforementioned properties, vehicles can be characterised by: 0 Registration (e.g. 123ABC) Make (e.g. Hyundai, Mitsubishi, Ford) Model (e.g. Excel, Lancer, Falcon) Year Grade (e.g. Luxury, Commercial, etc.) Number of Seats (from 2 to 10) Transmission Type (Automatic/Manual) Fuel Type (Petrol/Diesel) Inclusion of GPS Inclusion of Sunroof Daily Hire Rate Colour Customers also have various traits. A Customer class can define the shared properties and methods of all customers. Customers should have: Identification Number Title (e.g. Mr, Mrs, Dr, etc.) First Name Last Name Date of Birth (dd/MM/yyyy) Two container classes as described below should be written to maintain collections of vehicles and customers: Fleet: Manages the rental of vehicles. The fleet class should load the vehicle fleet and rental list from file on start-up. This class should be based on an array of Vehicle objects. It should support operations on the fleet (e.g. add/modify/delete) including rental based operations (e.g. rent/return car to/from customer). CRM: Manages the collection of customers. The CRM class should load the customers from file on start- up. This class should be based on an array of Customer objects. It should support operations on the Customer (e.g. add/modify/delete). Both the Fleet and CRM classes should save their data to disk when the program is closed by the operator. Submission stages This assignment is split into two distinct parts for submission described below. You are encouraged to start with Part A and modify your code after the due date to produce Part B. You will be graded only on the functionalities mentioned in each part. PART A (25%): Customer and Vehicle Management This part must have all customer and vehicle management functionality complete (functionalities 1 through 6). This includes the command line user interface and the background functionality. You are free to implement features of Part B although you will not be awarded any marks for it until it is due. PART B (25%): Rental Management This part must have all rental management functionality complete (functionalities 7 through 10 on page 1, as well as the rental functionalities in 3 and 6). This includes the command line user interface and the background functionality. Command-line interface Command-line interface You are required to create a command-line user interface for this program. The design of this Ul is largely up to you; however, it should be functional and relatively simple, and should allow operators to complete all required functions. The program must make sure that data is entered correctly and provide feedback to the user when necessary (e.g. when entering the vehicle registration of a new vehicle the program must ensure that the registration is unique (no duplicates allowed) and is in a valid format: three number followed by three letters). You can assume that data on disk (i.e. read from files) is always valid. Besides the vehicle registration restriction above, the program must make sure that the customer ID is unique. You may want to implement this by automatically generating a unique customer ID (for example, keeping track of the current highest customer ID and incrementing by one). A note on the processes of renting a vehicle to a customer. When renting the user should be able to specify the duration of rental (in days), and the total cost should be calculated accordingly (based on the daily rate). Rented vehicles cannot be rented again until returned. The system should allow the customer to return a vehicle at any time. A few important notes on the general functionality of user interface: 1. All user inputs should be treated as case-insensitive to improve usability of the program 2. All inputs should pass necessary validity checking, that is, user inputs meet specified data format (e.g. a string for name, 'dd/MM/yyyy' formatting for dates etc). 3. If any input is wrong, detect and prompt correction suggestions without crashing the program. For example, show an error or warning message like this: WARNING: The input 'O' was unrecognised. Please enter a character between 'a' and 'f. 4. Reserve some special keys e.g. ESCAPE for exiting the program, h for going back to the home menu (main menu), q for exiting the current menu and going back to the parent menu etc. You need to 4. Reserve some special keys e.g. ESCAPE for exiting the program, h for going back to the home menu (main menu), q for exiting the current menu and going back to the parent menu etc. You need to document these special keys in your brief user manual. Example command-line user interfaces are released together with this specification (see Appendix). It is recommended that you use these examples as a basis for your program although you are free to deviate, so long as you specify how to use your program in the submission report. Search capabilities The search capabilities of the MRRC program offers various levels of functionality. The following are just some examples. Many more queries of the same types are possible. There could be more/other attributes in queries. Queries are in free text format, but only allow attribute values, and the operators AND, OR, and (). Notes: Queries should not be case sensitive Fields with spaces should be encapsulated in double quotes (e.g. Fiero 2M4 should be searchable via "Fiero 2M4") Example queries: 1. All (leave blank and hit enter) 2. Single attribute query (assume each attribute name is unique in the entire system) Red Family 8-Seater GPS 3. A choice between two attributes (disjunction) Family OR Luxury Red OR Blue GPS OR 8-Seater 4. A combination of two attributes (conjunction) Red AND Family GPS AND Luxury 5. A choice between any number of attributes (disjunction) Economy OR Family OR Luxury Red OR Blue OR Green OR Purple 6. A combination of any number of attributes (conjunction) Red AND Luxury AND GPS GPS AND 5-Seater AND Red AND Commercial 7. A combination of any number of attributes, using both AND and OR with AND having the same priority (precedence) as OR Economy OR Family AND 5-Seater Red OR Blue OR Green OR Purple AND GPS 8. A combination of any number of attributes, using AND and OR with AND having a higher priority than OR, supporting parentheses to resolve priority ((GPS AND Sunroof) OR (Red OR Green)) AND Commercial OR Luxury Class specification In the accompanying class specification document, you are provided with a partial specification of the classes required to create a prototype for the MRRC program. For all classes you may implement additional private methods and parameters. You may also implement additional public methods and parameters where appropriate and necessary to complete the functionality. Even if you decided not to use this class specification (for whatever reason), please read it in its entirety, it has important information about the data requirements for this project. Recommended approach Tackling a large project such as this assignment may initially seem daunting, however breaking it down into smaller tasks that can be implemented and tested will make the task much more manageable and is an important skill for professional practice. You will develop this assignment as a bottom-up implementation exercise. This means that you will work based off a specification that has already been prepared and implement classes and methods, one by one, first implementing those classes and methods that don't rely on other classes to operate, then implementing the classes and methods that rely on those and so forth. Note that the user interface is often developed separately from the detailed functionality, by different programmers, as a team effort (although you will be working individually this time). It is here where the value of OOP is demonstrated. Once you have completed your command line user interface, a good place to start is the definition of the CRM and Customer classes (including file 1/0). What to submit For this assignment, you are required to submit a zip file - via Blackboard - containing the following items: ALL your C# files (.cs) A brief user manual A statement of completeness file (from the template on Blackboard) A self-filled CRA A class diagram of your code This is mandatory for both parts of the assignment. Below is a description of each of the non-code items required for submission. Plan for time to test your submission and complete all of this documentation, it is best done over the course of the project, not all at the end. You will be awarded points for completing each of the following items in full, make sure you complete and submit them all to maximize your grade 1. Write a brief user manual (README) and place it in the Documentation folder of the project. Briefly explain how to run your program and its main functionalities. A sample user manual using Markdown is provided, as well as an equivalent pdf version. You can use pure text or Word format for this user manual. 2. Prepare the statement of completeness and place it in the Documentation folder of the project. Name your file as "Statement-of-Completeness_n12345678" where n12345678 is your student number. This statement of completeness will need to accurately state the functionality which has been implemented. A template with instructions for the statement of completeness is provided with this file on Blackboard. You need to fill in the template provided. 3. Fill out the CRA yourself and place it in the Documentation folder of the project. The process of filling out the CRA yourself is critical in ensuring that you understand the task in full and you are doing your best to meet the requirements. We will not be using your CRA as a marking tool for this assessment, it is purely for your own benefit. 4. A class diagram of your code. The process for completing this will be covered during class. Criteria Sheet - Part A (25%) If you have used or drawn inspiration from others' code, you must include a reference to the original author or source in the method comments. You must give credit where it is due to protect yourself against plagiarism accusations. You are not allowed to reuse code for the entire project. You must fill this CRA (along with the SoC, transcript and documentation) and upload it as part of your submission. Failure to do so will result in a loss of points from your final marks for each part. The marks indicated in the tables below are the highest mark you can get for a specific section. You may receive partial marks based on your delivery quality. Your final score (as a percentage of your final grade for this unit) for each part will be calculated using the following formula: Points Scored Final Score = Available Points x Weighting Criteria tables Submission Items Each of the items below are required for submission, failure to submit any of these items will result in a loss of points. If any of the items are submitted but left incomplete you will lose a portion of the amount listed on the right of the table. The amount lost will be proportional to the amount of incomplete work. Awarded Possible Project Documentation 2 Statement of Completeness 2 Program Transcript 2 Self-filled CRA 2 Class Diagram 2 Total 10 Functionality File 1/0 To gain points for this section, it must be clear that your program can read and write to and from the provided samples files. To demonstrate the write functionality your program must be able to add/remove/modify the vehicles/customers data and save it to the appropriate file. To demonstrate the read functionality your program must be able to correctly interpret data from the files before and after writing. Awarded Possible Customer data can be read from a file (customers.csv) 3 Vehicle data can be read from a file (vehicles.csv) 3 Customer data can be written to a file (customers.csv) 3 Vehicle data can be written to a file (vehicles.csv) 3 Total 12 Functionality - User Interface To gain points for this section, the following features must be easily accessible and testable via the console user interface. All of the following functionalities must be demonstrated in the program transcript. Awarded Possible CRM: View list of customers 2 CRM: Add customer: Functionality 3 CRM: Add customer: Unique customer ID validation 1 CRM: Add customer: Other input field validation 1 CRM: Modify customer: Functionality 3 CRM: Modify customer: Unique customer ID validation 1 CRM: Modify customer: Other input field validation 1 CRM: Remove customer: Functionality 2 Fleet: View list of vehicle 2 Fleet: Add vehicle: Functionality 3 Fleet: Add vehicle: Unique registration validation 1 Fleet: Add vehicle: Other input field validation 1 Fleet: Modify vehicle: Functionality 3 Fleet: Modify vehicle: Unique registration validation 1 Fleet: Modify vehicle: Other input field validation 1 Fleet: Remove vehicle: Functionality 2 Total 28 Code Quality To gain points for this section, you must maintain good code quality throughout your whole project. While following the CAB201 C# Coding Style Guide will help you meet these criteria, you do not have to follow it to the letter (at the least you must be consistent and clear). Important: Your target reader is a programmer, not an absolute beginner. Awarded Possible Maintained, consistent and clear standard in variable, method and class naming 2 Magic number have been replaced with appropriately named constants. 1 Consistent and appropriate white spacing, line length, indentation, and organisation of files within the project (ie. not one single Program.cs file - you should have other files to organise your classes) 2 Class header comment at beginning of each class, comment before every method, and in-line comments to explain complex or not easily discernible code. In-line comments are not excessive. 3 Methods are single purpose and clear, and code is reasonably efficient and succinct. 2 Total 10 Presentation To gain points for this section, you must ensure your user interface is of a high quality. Your interface does not need to be flashy or overly visually appealing - instead you should focus on making it clear, intuitive and easy to use. Awarded Possible Incorrect input is handled appropriately and clearly. 2 The overall design is clean and uncluttered. Data is displayed clearly. 2 All necessary functionality of the UI is clear, easy, and quick to access. 4 Special cases are handled nicely (e.g. when the user requests a list of vehicles and there are no vehicles, a message is displayed rather than just an empty list of vehicles). 2 Total 10 Bonus Criteria (+) To gain points for this section, you must implement advanced OOP concepts in your code. You have freedom in where/how these concepts are implemented in your code. Ask the teaching team if you require some advice or guidance. Awarded Possible 5 Project code exhibits at least one good use of encapsulation (separate from the classes detailed in the class diagram). Recommended Approach: There are many opportunities to implement some level of encapsulation in your code, some good examples are: A Table class which can store and print formatted data for a table. A Menu class which can control program flow. Project code exhibits at least one good use of inheritance. Recommended Approach: The Vehicle class can be inherited by four distinct subclasses, each categorised by the vehicle grades (Economy, Family, Luxury, Commercial). Appropriate constructors can be set which make use of the default values of the different classes. 5 Total 10 The details in this user manual have been left vague and/or incomplete by design. Please ensure your user manual is complete and descriptive enough for your tutor to follow for marking purposes. This program has many functionalities, and will allow the operator to do a number of processes to manage a vehicle rental management system. It is important to follow the instructions detailed in the manual carefully so that the program behaves as expected. Building and running To build the code for this program, open the folder containing the .csproj file in Visual Studio Code. Press F5 to build and run the project. This will open a new console window from which the program will run. You should be met with the following greeting message, followed by the main menu: ### Mates-Rates Rent-a-Car Operation Menu ### You may press the ESC key at any menu to exit. Press the BACKSPACE key to return to the previous menu. Custom Files By default, the program data is stored within appropriately labelled comma-separated value (CSV) files located in Data folder (inside the root folder). Namely: fleet.csv - Vehicle fleet data customers.csv - Customer information data rentals.csv - Vehicle and customer rental data If the user wishes to use files stored elsewhere they should be specified as command line arguments. To do this right-click the MRRC project in the Solution Explorer and, select the Debug tab in the newly opened file and paste the following into the command line arguments text box: --fleet=path/to/fleet.csv --rentals=path/to/rentals.csv -- customer's path/to/customers.csv Note that you will need to replace the dummy paths with paths to the files you wish to use in the program (relative or absolute). Once you have done this, you man run the program as described before. Program Usage This program is comprised of a hierachal set of menus. You will start at the Main Menu, and depending on your choice you will be sent to different sub-menus, all focused on a specific aspect of the system. As specified in the greeting message you may press the ESC key at any menu to exit the program, and the BACKSPACE key to return to the previous menu. Main Menu When you enter the program the following main menu will be displayed after the greeting message: Please enter a character from the options below: a) Customer Management b) Fleet Management c) Rental Management After you input a character (a, b or c) the program will enter the corresponding sub-menu (there is no need to press enter on any of the menus, the program is expecting only a single character). Customer Management Menu When you enter a on the Main Menu the following menu will be displayed. You will note that each of the options on the menu correspond to a core process relating to the mangement of customers. Please enter a character from the options below: a) Display Customers b) New Customer c) Modify Customer d) Delete Customer After you input a character (a, b, c or d) the program will enter a small prompt based sequence to assist you in completing your task. Display Customers This sequence will very simpily draw a table to the console containing details for every customer in the CRM. It may look something like this: +--+ |ID|Title FirstName LastName Gender | DOB 10 IMS Holly Hutson Female | 07/01/1990 11 IMS Beverley Woodrow Female | 08/07/19871 12 Mr Albert Audra Male (11/12/1930 13 Mrs Ami Berry Female 09/01/1999 14 Count|Fredrich von Trapp | Male 14/03/1997| +-------+ CLASS DIAGRAMS The following class diagrams are only a suggestion. You are free to modify or redesign the classes if you wish. For example, you may want to implement additional public methods in the Vehicle class which assist in the search functionality. For each class, getter and setter functions may be replaced with appropriate properties in this case they would all be public instead of private as they may appear in the class diagram). In general, property getters and setters are left as defaults. While the class diagram below will likely make up the bulk of the backend of your project, you are encouraged to implement your own classes when applicable. In the sample solution for this project, as many as 15 classes and enumeration types were created (although you are certainly not expected to reach that number)! public class Vehicle Vehicle - vehicle Rego: string - make: string - model: string -year: int -vehicleGrade: VehicleGrade - num Seats: int - transmission: Transmission Type fuel: Fuel Type GPS: bool - Sun Roof: bool - dailyRate: double -colour:string + ToCSVString() + ToString() + GetAttributeList() The vehicle class should have appropriate getter and setter methods for each field, or properties can be used. VehicleGrade, Fuel Type, and Transmission Type should be appropriately defined enumeration types. The vehicle class should have appropriate getter and setter methods for each field, or properties can be used. VehicleGrade, Fuel Type, and Transmission Type should be appropriately defined enumeration types. Method Descriptions // This constructor provides values for all parameters of the vehicle. public Vehicle(string registration, VehicleGrade grade, string make, string model, int year, int numSeats, TransmissionType transmission, Fuel Type fuel, bool GPS, bool sunroof, double dailyRate, string colour) // This constructor provides only the mandatory parameters of the vehicle. Others are // set based on the defaults of each class. // Overall defaults: // 4-seater // Manual transmission Petrol fuel // - No GPS // - No sun-roof // - $50/day // Black // Economy vehicles: 1/ // - Automatic transmission // Family vehicles: // - $80/day // Luxury vehicles: // - Has GPS - Has sun-roof - $120/day // Commercial vehicle: // - Diesel fuel // - $130/day public Vehicle(string registration, VehicleGrade grade, string make, string model, int year) // This method should return a CSV representation of the vehicle that is consistent // with the provided data files. public string ToCSVString() // This method should return a string representation of the attributes of the vehicle. public override string ToString() // This method should return a list of strings which represent each attribute. Values // should be made to be unique (e.g. numSeats should not be written as 4 but as 4 // Seater, sunroof should not be written as "True but as "sunroof or with no string // added if there is no sunroof). Vehicle rego, grade, make, model, year, transmission // type, fuel type, and colour can all be assumed to not overlap (i.e. if the make // "Mazda exists, Mazda will not exist in other attributes). You do not need to // maintain this restriction, only assume it is true. You do not need to add the daily // rate to this list. public List GetAttributelist() An alternative approach can be taken to the Vehicle class for additional marks. In this approach, the Vehicle class should be an abstract class, and each grade of car (Economy/Family/Luxury/Commercial) should extend the Vehicle class. Appropriate constructors should be set which make use of the default values of the different classes. public class Customer Customer - customerlD: int - title: string - firstNames

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Domain Transfer Learning With 3q Data Processing

Authors: Ahmed Atif Hussain

1st Edition

B0CQS1NSHF, 979-8869061805

More Books

Students also viewed these Databases questions

Question

Draw and explain the operation of LVDT for pressure measurement

Answered: 1 week ago

Question

Persuasive Speaking Organizing Patterns in Persuasive Speaking?

Answered: 1 week ago