This type should be used in the program to store


Laboration  - Vehicle register

In this exercise, you should create a program that represents a vehicle register, i.e. a register of vehicles and its owners. Your customer is the Transport Authority, which task it is to keep track of all vehicles on the road in Sweden.

The Vehicle register should in this first version have a text-based interface. The following describes the data and the functions that should be included in the program.

Data

The type Person

This type should be used in the program to store information on vehicle owners. The information we need in this situation is the owner's name and age.

The type Vehicle

A vehicle have the properties vehicle type, vehicle make, registration number and owner. All these properties should get values when a vehicle is created.

Functions

An array that can store 10 vehicles should be created in the beginning of the program. If a register file already exists, this should be loaded into the array.

Thereafter, a menu with the following options should be presented:

Add a vehicle

In a function, information about the vehicle and its owner should be taken in from the user and the vehicle should be entered in the register. Check that the register is not already full.

Remove a vehicle

In a function, a vehicle in a specified position should be removed from the register. Check that the position is valid Sort by vehicle make
In a function, the register is sorted alphabetically by vehicle make.

Print information about a vehicle

In a function, information about a vehicle in a specified position should be printed.

Check that the position is valid.

Print the entire vehicle register

In a function, information about all vehicles in the register should be printed.

Quit

When the user chooses to quit, the register must be written to file.Requirements for the application code

• Secure input

• No "magic numbers"

• No Global variables

• File management functions should be in a separate c-file

• All standard header files, type declarations, function prototypes, etc. should be put in a header file

• Functions must not be "too long" Voluntary extra assignments:

1. Make it possible for a vehicle to have multiple owners

2. Make a search function where you can search for all the vehicles a certain person owns.

3. Make a search function where you can find out who owns a particular vehicle.

4. Make a search function where you can search for any of a vehicle's properties

5. Make a search function where you can search for a combination of a vehicle properties.

Request for Solution File

Ask an Expert for Answer!!
JAVA Programming: This type should be used in the program to store
Reference No:- TGS02594230

Expected delivery within 24 Hours