Question: I have to implement a program in Java where there is an object list with cars. For each car i have the manufacturer, the model

I have to implement a program in Java where there is an object list with cars. For each car i have the manufacturer, the model and its cost. My program should read the list and show how many different models are from the same manufacturer. Every double log will be ignored. The implementation should be with hashmap, Set and JOptionPane. Example of the list and the print :
list
Toyota Yaris 14000
Opel Corsa 16000
Toyota Aygo 11000
Toyota Corolla 17000
Fiat Panda 12000
Opel Corsa 15500
Toyota Yaris 17000
Opel Astra 19000
Fiat Tipo 12000
print
Fiat: 2 [Panda, Tipo)
Opel: 2 [Corsa, Astra]
Toyota: 3 [Yaris, Aygo, Corolla]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!