Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Java Expert


Home >> Java

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.

Java, Programming

  • Category:- Java
  • Reference No.:- M92607401

Have any Question?


Related Questions in Java

Part a specification - robot simulationpart a

PART A Specification - Robot Simulation PART A Requirements To complete this assignment you will use the supplied eclipse project Robot P1/. It is already set up to execute a simple arm movement loop which you will build ...

Assessment database and multithread programmingtasktask 1

Assessment: Database and Multithread Programming Task Task 1: Grade Processing University grading system maintains a database called "GradeProcessing" that contains number of tables to store, retrieve and manipulate stud ...

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 ...

Assessment socket programmingtaskwrite a java gui program

Assessment: Socket Programming Task Write a JAVA GUI program that would facilitate text chatting/exchanging between two or multiple computers over the network/internet, using the concept of JAVA socket programming. If yo ...

Assignment game prototypeoverviewfor this assessment task

Assignment: Game Prototype Overview For this assessment task you are expected to construct a prototype level/area as a "proof of concept" for the game that you have designed in Assignment 1. The prototype should function ...

Assignment taskwrite a java console application that allows

Assignment task Write a java console application that allows the user to read, validate, store, display, sort and search data such as flight departure city (String), flight number (integer), flight distance (integer), fl ...

Project descriptionwrite a java program to traverse a

Project Description: Write a java program to traverse a directory structure (DirWalker.java) of csv files that contain csv files with customer info. A simple sample in provided in with the sample code but you MUST will r ...

Assignment - java program using array of objectsobjectives

Assignment - JAVA Program using array of objects Objectives - This assessment item relates to the course learning outcomes as stated in the Unit Profile. Details - For this assignment, you are required to develop a Menu ...

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 ...

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 ...

  • 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