write the program in java. Demonstrate that you understand how to use object-oriented programming concepts, display data
Question:
write the program in java.
- Demonstrate that you understand how to use object-oriented programming concepts, display data from a table in a database, obtain input from the user, validate user input, calculate totals, and display output.
This project is worth 300 points. You will be graded as follows:
Database creation and connectivity - 50 points
OOP programming with classes and subclasses – 50 points
User input validation – 50 points
Program logic for calculating the rental output – 50 points
Proper JavaDoc comments above all class and method signatures – 20 points
JavaDoc creation in your project folder – 30 points
Screen captures of your test results (be sure to test all 3 vehicles) – 50 points
Create a java project VehicleRentalTest3## (where ## is your initials) for a vehicle rental calculator.
Create a database dbVehicleRental with table TLocations to store the car rental pickup locations. The table needs columns for the location name, address, city, state, and zip. Be sure to include your sql script in the Database folder of your project. Create location records in your table (4). Display your pickup locations at the start of your program. (50 points) You only need to display the records from the table. It must be in the format below:
Here are the pickup locations - we will call you with a location confirmation
ID: 2 Name: Downtown Address: 2010 Vine City: Cinti Zip: 45201
ID: 4 Name: Hamilton Address: 9010 C Street City: Hamilton Zip: 45013
ID: 3 Name: Loveland Address: 202 Main St City: Loveland Zip: 45140
ID: 1 Name: Northwest Address: 10 Colerain City: Cinti Zip: 45241
Force the customer to enter name, phone (allow 2 formats), email address, vehicle pickup date, # of rental days, and allow the user to rent up to 3 vehicles at once. After the customer selects the vehicles to rent, output the details for each vehicle, price per vehicle * number of days, and total rental price. (50 points)
Be sure to create IsValidPhoneNumber method to validate the phone number and IsValidEmailAddress to validate the email address (must begin with a character, have the @ sign, and have an extension of 2 to 6 characters). (50 points)
Create a main program CVehicleFinal. Create a vehicle class parent class (CVehicle). Then, create child classes for each vehicle type (CCar, CMotorbike, CTrailer). The program must have all the attributes and methods shown in the diagram in this document. (50 points)
You must include JavaDoc comments above all your method and class signatures. (20 points)
Create a JavaDoc for this project. (50 points)
Be sure to include a print screen of your test results. (50 points)
Be sure to submit your zip your entire project folder along with your test print screens.
Here are the requirements for this project:
INPUTS
The application must allow the user to type in the following “required” information for each vehicle rental calculator:
- Customer Name
- Phone Number (validate using regular expressions – create method IsValidPhoneNumber)
- Email Address (validate using regular expressions – create method IsValidEmailAddress)
- Number of Rental Days
- Number of Vehicles to Rent
- Select the type of Vehicle to Rent
OUTPUTS
- For each transaction display the following:
- Customer Name
- Phone Number
- Email Address
- Type of Vehicle to Rent
- Information about the Vehicle such as how the vehicle drives, number of MPGs, etc.
- Total Rental for vehicle based on Price * Number of Days (must display 2 decimal places)
- Total Rental Amount for all vehicles (must display 2 decimal places)
Principles Of Information Security
ISBN: 9780357506431
7th Edition
Authors: Michael E. Whitman, Herbert J. Mattord