1. You are to write a simple program with two classes. One controller class and a class to hold your object definition. (Similar to what we will use in class) 2. Read in the following from the JOptionPane input window: a. Customer First Name b. Customer Last Name c. Customer Phone Number (example: 9093873744) d. Number of Vehicles to be manufactured (example: 5) e. Number of fuel tanks to be mounted on the vehicle. 3. Make sure the following is entered correctly, otherwise display an error message and ask the user to re-enter the data: a. The first name of the customer is not blank b. The last name of the customer is not blank c. The phone number of the customer is not blank and is 10 characters d. The number of vehicles is between 1 and 10 (includes 1 and 10) e. The number of fuel tanks can only be (2,4,8,10, 15,20) 4. Compute the cost for manufacturing vehicles using the price of $500.19 per vehicle 5. Compute the cost for fuel tanks using the price of $2.15 per fuel cell. 6. For this project each vehicle tank holds 12 Fuel Cells and vehicles can have more than one tank. 7. Use the following formulas to perform the calculations: Cost for manufacturing = number of vehicles * manufacturing price Cost for fuel tanks = number of vehicles * number of tanks * number of fuel cells per tank * price of fuel cell 8. Then you are to test the program using the data listed below. In the case of the first customer enter the data that has errors as shown in the screenshots below. The program should prompt you to reenter the data until the data is valid. First Name Last Name Phone Number of Vehicles Number of Tanks Simpson Simpson Simpson Simpson Homer 9093429871 5 8 Bart 9093429872 Tex2 2 Lisa 9093429873 4 15 Marge 9093429874 3 4

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
Assignment
1. You are to write a simple program with two classes. One controller class and a class to
hold your object definition. (Similar to what we will use in class)
2. Read in the following from the JOptionPane input window:
a. Customer First Name
b. Customer Last Name
c. Customer Phone Number (example: 9093873744)
d. Number of Vehicles to be manufactured (example: 5)
e. Number of fuel tanks to be mounted on the vehicle.
3. Make sure the following is entered correctly, otherwise display an error message and ask
the user to re-enter the data:
a. The first name of the customer is not blank
b. The last name of the customer is not blank
c. The phone number of the customer is not blank and is 10 characters
d. The number of vehicles is between 1 and 10 (includes 1 and 10)
e. The number of fuel tanks can only be (2,4,8,10, 15,20)
4. Compute the cost for manufacturing vehicles using the price of $500.19 per vehicle
5. Compute the cost for fuel tanks using the price of $2.15
per
fuel cell.
6. For this project each vehicle tank holds 12 Fuel Cells and vehicles can have more than
one tank.
7. Use the following formulas to perform the calculations:
Cost for manufacturing = number of vehicles * manufacturing price
Cost for fuel tanks
= number of vehicles * number of tanks * number of fuel cells per
tank * price of fuel cell
8. Then you are to test the program using the data listed below. In the case of the first
customer enter the data that has errors as shown in the screenshots below. The program
should prompt you to reenter the data until the data is valid.
First Name
Last Name
Phone
Number of Vehicles
Number of Tanks
Simpson
Simpson
Simpson
Simpson
Homer
9093429871
5
8
Bart
9093429872
Tex2
Lisa
9093429873
4
15
Marge
9093429874
3
4
Transcribed Image Text:Assignment 1. You are to write a simple program with two classes. One controller class and a class to hold your object definition. (Similar to what we will use in class) 2. Read in the following from the JOptionPane input window: a. Customer First Name b. Customer Last Name c. Customer Phone Number (example: 9093873744) d. Number of Vehicles to be manufactured (example: 5) e. Number of fuel tanks to be mounted on the vehicle. 3. Make sure the following is entered correctly, otherwise display an error message and ask the user to re-enter the data: a. The first name of the customer is not blank b. The last name of the customer is not blank c. The phone number of the customer is not blank and is 10 characters d. The number of vehicles is between 1 and 10 (includes 1 and 10) e. The number of fuel tanks can only be (2,4,8,10, 15,20) 4. Compute the cost for manufacturing vehicles using the price of $500.19 per vehicle 5. Compute the cost for fuel tanks using the price of $2.15 per fuel cell. 6. For this project each vehicle tank holds 12 Fuel Cells and vehicles can have more than one tank. 7. Use the following formulas to perform the calculations: Cost for manufacturing = number of vehicles * manufacturing price Cost for fuel tanks = number of vehicles * number of tanks * number of fuel cells per tank * price of fuel cell 8. Then you are to test the program using the data listed below. In the case of the first customer enter the data that has errors as shown in the screenshots below. The program should prompt you to reenter the data until the data is valid. First Name Last Name Phone Number of Vehicles Number of Tanks Simpson Simpson Simpson Simpson Homer 9093429871 5 8 Bart 9093429872 Tex2 Lisa 9093429873 4 15 Marge 9093429874 3 4
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Unreferenced Objects
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education