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
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
Related questions
Question
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
Knowledge Booster
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.Recommended textbooks for you
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)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
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)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education