Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Java Expert


Home >> Java

Project requirements

For the problem described in the next section, you must do the following:

1. include your student ID at the end of all filenames for all java code files. Three classes have been identified in section 3.4 as being re- quired as part of your solution. Do not modify the names of these classes except for adding your student ID to the end of the filename. Other Java files will be needed as part of your solution. All Java code files that are used in this assignment MUST have your student ID ap- pended to the filename. For example, Dealer ########.java;

2. include your authorship details at the top of each file in code com- ments (see Section 4 of this document for details);
3. adhere to the coding standard as identified in the Google Java Style Guide (see Section 4 for details);
4. ensure that standard Input/Output are used in all code segments - do not use Swing;
5. ensure that your Java code is appropriately modularised for the given problem definition. That is, you need to write appropriate classes and methods to solve the problem;
6. not use any dynamic data structures such as arraylists. If you are unsure if you can use a particular data structure check with the unit coordinator first;
7. reference all sources that you used for inspiration of your solution as per Section 5 of this document;
8. Ensure that your Java code compiles and runs in Eclipse Oxygen.3
(as installed on the lab machines).

3 Project Details
General information
Your task is to create a menu-driven Java program using object-oriented code to manage the inventory of cars held by a network of used-car deal- ers. Your program will implement a strictly limited set of functions (i.e. not a real-world implementation), allowing the user to make adjustments to the inventory as dealers buy and sell cars, to generate inventory reports, and to retrieve and save data in secondary storage (in this case, text files). In general, your program will need to read data from the keyboard and from certain text files in secondary storage, store the data in appropriate data structures using objects, sort and search the data, and write output
data to both the screen and to secondary storage.

The following sections of this document describe:
- specific functional requirements;

- text files that are to be used;
- classes that must be used as a minimum.

Program requirements and functionality

Basic requirements
The Java program must:
1. be object-oriented using the classes described below as a minimum. Other classes may also be needed to solve the program requirements;
2. be menu-driven. The main menu must have the following menu items:
1. Adjust Dealer Inventory
2. Inventory Report
3. Save
4. Exit Program

3. be able to process the defined text files. The text files and their for- mats are described below.

Program Start-up
When the java program starts it must perform the following file related operations:

1. Read the data from the dealers.txt file into computer memory into an appropriate array of objects (see below for a description of the dealers text file and for a description of the dealer class). If the dealer file does not exist then the user should be informed of this and given the opportunity to provide an alternative filename that contains the dealer data;

2. Read the data from the inventories.txt file into computer mem- ory into an appropriate array of objects (see below for a descrip- tion of the inventories text file and for a description of the Inventory class). If the inventories file does not exist then the user should be informed of this and given the opportunity to provide an alternative filename that contains the inventory data;

3. Read the data from the cars.txt file into computer memory into an appropriate array of objects (see below for a description of the cars text file and for a description of the Car class). If the cars file does not exist then the user should be informed of this and given the opportunity to provide an alternative filename that contains the cars data.
After processing these three files the program should display the main menu identified above.

Main menu item functionality
The required functionality for each menu item is described as follows:

1. Adjust Dealer Inventory - when this menu option is selected the following actions should be performed by the program:
- Find the dealer whose inventory is to be adjusted.
Identify which car they have bought or sold. If the dealer holds that particular car in inventory, it may be bought or sold; otherwise, it may only be bought.
- determine if the car has been bought or sold by the dealer
make the inventory adjustment (ensure your program takes into ac- count all logical validation conditions when doing so).
generate an on-screen summary of the inventory adjustment. The summary must show the dealer name and address, inventory ID, current date, car ID, make, model and year, and the price of the car. Make sure that this is displayed in a clear and logical format on the screen.

2. Inventory Report - when this menu option is selected the following actions should be performed:
- Determine if the report is for all dealers or for a specific dealer;
generate the Inventory Report for either all dealers or the specified dealer. The Inventory Report should have a similar layout to the following example:

3. Save - the program must write the inventories data back to the In- ventories text file (dealer and car data will not have changed so need not be written back to the files).

4. Exit Program - the program must terminate when this menu item is selected. The program should not terminate until this option is chosen. If the inventory data have changed since the last save then do not exit the program. Instead, warn the user that they should choose the Save option, then return program control to the main menu.

Text files to be processed
The data that are to be manipulated by your Java program for this assign- ment are contained in the text files dealers.txt, inventories.txt, and cars.txt. Examples of these text files are found in the .zip file for the assignment.
The data within these text files will need to be read into memory by your program so that they may be manipulated to carry out the required functionality of the assignment. The text files have been created to con- form to a particular format. The format for each file is described below.

File: dealers.txt This file contains a full record of all dealers in the net- work. Each line in the file represents an individual dealer with the follow- ing format:
Dealer ID, Dealer Name, Dealer Address, Inventory ID where each data item is separated by a comma (,).
Data items:
Dealer ID: a unique numeric identifier for a dealer
Dealer Name: the dealer name, which may contain spaces

Dealer Address: the dealer's address
Inventory ID: a unique identifier for the dealer's inventory of cars A dealers file has been provided in the assignment .zip file.

File: inventories.txt This file contains a full record of all dealer invento- ries. Each line within this file represents an individual inventory of cars for a dealer, and has the following format:
Inventory ID, [carID] 10
where each data item is separated by a comma (,).
Note: An inventory can contain up to 10 different cars, so the carID may be repeated up to 10 times.
Data items:
Inventory ID: a unique identifier for the dealer's inventory of cars. carID: a unique identifier for a particular car.
Two (2) inventory files have been provided in the assignment .zip file.

File: cars.txt - This file contains a full record of all cars that can be bought or sold by the dealers. Each line within the file represents a car and has the following format:
CarID, Make, Model, Year, Value
where each data item is separated by a comma (,).
Data items:
carID: a unique identifier for a particular car. Make: the make of the car
Model: the model of the car
Year: the year of the car's manufacture Value: the value of the car in dollars
A cars file has been provided in the assignment .zip file.

Notes:

1. When reading the text files into memory the data should be read into appropriate array(s) of objects. The classes for these objects are briefly outlined below.

2. For the purpose of marking the assignment the number of lines of data and the data values in the text files will be replaced with dif- ferent data by the marker. This is to ensure that your solution has not relied upon specific data values or the number of lines in the text files to work. You should therefore test your program with different data files of varying length and varying data before submission.

Attachment:- project.zip

Java, Programming

  • Category:- Java
  • Reference No.:- M93131475
  • Price:- $60

Priced at Now at $60, Verified Solution

Have any Question?


Related Questions in Java

Assessment instructionsin this assessment you will design

Assessment Instructions In this assessment, you will design and code a simple Java application that defines a class, instantiate the class into a number of objects, and prints out the attributes of these objects in a spe ...

Question slideshows or carousels are very popular in

Question : Slideshows (or carousels) are very popular in websites. They allow web developers to display news or images on the website in limited space. In this code challenge, you are required to complete the JavaScript ...

Answer the following question whats the difference public

Answer the following Question : What's the difference public inheritance and private inheritance? What can derived classes inherit from base classes? What cannot be inherited from base classes?

Retail price calculatorwrite a java program that asks the

Retail Price Calculator Write a JAVA program that asks the user to enter an item's wholesale cost and its markup percentage. It should then display the item's retail price. For example: (If an item's wholesale cost is 5. ...

Project requirementsfor the problem described in the next

Project requirements For the problem described in the next section, you must do the following: 1. include your student ID at the end of all filenames for all java code files. Three classes have been identified in section ...

In relation to javaa what is constructor the purpose of

(In relation to Java) A. What is constructor? the purpose of default constructor? B. How do you get a copy of the object but not the reference of the object? C. What are static variables and instance variables? D. Compar ...

Overviewyou are required to use java se 80 and javafx to

Overview You are required to use Java SE 8.0 and JavaFX to develop a Graphical User Interface (GUI) for the FlexiRent rental property management program created in Assignment 1. This assignment is designed to help you: 1 ...

Assignment - method in our madnessthe emphasis for this

Assignment - "Method in our Madness" The emphasis for this assignment is methods with parameters. In preparation for this assignment, create a folder called Assign_3 for the DrJava projects for the assignment. A Cityscap ...

Fundamentals of operating systems and java

Fundamentals of Operating Systems and Java Programming Purpose of the assessment (with ULO Mapping) This assignment assesses the following Unit Learning Outcomes; students should be able to demonstrate their achievements ...

Simple order processing systemquestion given the classes

Simple Order Processing System Question: Given the classes Ship (with getter and setter), Speedboat, and SpeedboatTest. Answer the following questions: Refine the whole application (all classes) and create Abstract class ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As