e make, YYYY is the year it was manufactured, C is the first letter of the colour and XX is the value provided by the class

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter3: Using Methods, Classes, And Objects
Section: Chapter Questions
Problem 2GZ
icon
Related questions
Question

Create a simple java program that reads all the content in a .txt file, the user will enter the filename to be opened. In this case, the file will contain multiple lines of Car details with each line containing a single car detail. Your task is to then create a Car class that models the Make, Colour, type and year manufactured. The Car class should further be able to assign every car created with a unique serial number using a class variable[format is AAAYYYYCXX, AAA is the first 3 letters of the make, YYYY is the year it was manufactured, C is the first letter of the colour and XX is the value provided by the class variable(in form 01) all in upper caps see samples]. Within the driver class add all the cars read from the file onto a stack following LIFO approach and then print details of 2 cars from the stack that are older then 5 years. You are additionally expected to deal with most common exceptions(See samples below)

[HINT: DO NOT PROVIDE A PATH BUT RATHER ONLY OPEN THE FILE WITH RELATIVE PATH/FILENAME]

 

Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Class
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
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning