Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

class Vehicle { private String vehicleName; 1/Exora, MyVii, X50 private String vehicle Iype; //MPV, Sedan, SUV private String vehicleRegistration Date : //ddmmyyy. private double vehicle

image text in transcribed

class Vehicle { private String vehicleName; 1/Exora, MyVii, X50 private String vehicle Iype; //MPV, Sedan, SUV private String vehicleRegistration Date : //ddmmyyy. private double vehicle rice; //RM40000, RM170000 /*** Definition of other methods including normal constructor, mutators, accessors and toString(). } class Queue public Queue () {-} public void enqueue (Vehicle data) {-} public Vehicle dequeue () {---} public boolean isEmpty) {-} } RSWZ Used Car company uses a system to store and keep track of its used car's record by using the queue data structure. Assume that the data have been stored into a queue named queueVehicle, answer the following questions. i. Find and display how many used cars were registered in the year 2017. (Note: In order to avoid data loss, use a temporary queue to store the information.) (4.5 marks) ii. Move all Exora cars which priced less than RM170,000.00 into queueExora while the other Exoca cars remain in the original queue. (4 marks)

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

Relational Database And SQL

Authors: Lucy Scott

3rd Edition

1087899699, 978-1087899695

More Books

Students also viewed these Databases questions

Question

In an Excel Pivot Table, how is a Fact/Measure Column repeated?

Answered: 1 week ago