Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a Java program that reads the dealers.txt file and displays each data value for each line from the file to the screen in the

Write a Java program that reads the dealers.txt file and displays each data value for each line from the file to the screen in the following format: Dealer ID: value Dealer Name: value Dealer Address: value Inventory ID: value

Some notes on how to do this are in file read.pdf.

2. Write a Java class named Dealer. The Dealer class represents an individual dealer in the network. The Dealer class needs data fields for the Dealer ID, name, address, inventory id. Implement appropriate constructors, accessors, and mutators where necessary. 1

3. Modify the Java program from exercise 1 above so that it creates a Dealer object for each line of the text file.

4. Modify the Java program from exercise 3 to include an array of Dealers. As each Dealer object is created from the file place it into the array of Dealers. To test that this process has worked, iterate through the Dealer array after it has been populated with objects to display the Dealer ID and Dealer Name of each object.

5. Repeat exercises 1 to 4 for the other text files and classes from the Programming Project.

6. Write a Java program that displays the following menu to the screen and only terminates when option 4 is chosen by the user: 1. Adjust inventory 2. Inventory report 3. Save 4. Exit Program

When the user chooses menu item 1 to 3 the program should simply display the statement You chose option # and then redisplay the menu. Your program should only accept the input 1 through 4 from the user.

{ this is all information from dealers.txt }

5654,CarsRUs,854 Pacific Hwy Chatswood, inv523 8521,Parramatta Ford, 56 George St Parramatta, inv841 6521,Parramatta Mazda, 9875 Parramatta Rd Parramatta, inv897 8541,Penrith Jeep, 854 Northern Road Penrith, inv866 2356,Tesladyne, 1 Electric Ave Ultimo, inv522 2187,Bobs Car Shack, 5767 Parramatta Rd Parramatta, inv335 2698,Campbelltown Honda, 4578 Campbelltown Rd Campbelltown, inv447 5487,Campbelltown Ferrari, 674 Narellan Rd Campbelltown, inv858 6565,Penrith VW, 676 Northern Rd Penrith, inv898 2378,Camden Car Works, 6734 Camden Valley Way Camden, inv477 9595,Kingswood Country, 45 Kingswood Rd Kingswood, inv228 9562,Parramatta Jaguar, 34 Church St Parramatta, inv558

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

Database Systems Design Implementation And Management

Authors: Peter Rob, Carlos Coronel

6th International Edition

061921323X, 978-0619213237

More Books

Students also viewed these Databases questions

Question

What process do you have in place for development planning?

Answered: 1 week ago