You are on page 1of 2

AMERICAN UNIVERSITY OF SCIENCE & TECHNOLOGY

FACULTY OF ARTS AND SCIENCES

CSI250L / ICT311L – Programming II Lab


Section A

Fall Term 2023-2024

Lab Work 9.1

Problem 1:
A. Write the classes’ implementations for the following classes’ specifications.

MaintenanceService
• Invoiceid: an integer to identify each TransactionID.
• Date: a String ex (4/12/2023)
• Type: a String specify the type or subject( like replace Oil,
Attributes etc)
• Cost: a double of customer spend
• ModelNumber: an integer to specify the Car Model
Number
• Constructor.
Methods • set and get methods.
• toString

Car
• CarNumber: an integer to identify each car.
• carowner: a String.
Attributes • MaintenanceService : an array of objects of class
MaintenanceService to specify the previous Maintenance
(if any) of the car
• Constructor.
• set and get methods.
Methods
• toString

1
B. Write a java application to do the following (Use JOptionPane methods):
• Create N objects of class Cars and let the user initialize them
• Display the total spend of all cars
• Display information about any car owner who spend more than 100$
• Display information about previous Maintenance of a specific Car Number

You might also like