Question: its need to be coded in Java A string contains the information of cars. The string has the following format: brand1.model1.price1, fuel_efficiency1.brand2.model2,price2 fuel efficiency2... 1.

 its need to be coded in Java A string contains the

its need to be coded in Java

A string contains the information of cars. The string has the following format: "brand1.model1.price1, fuel_efficiency1.brand2.model2,price2 fuel efficiency2..." 1. Write a method named avgPrice that takes a String in the above format and returns the average price per car. 2. Write a method famed efficientCars that takes a String in the above format and returns the number of cars with fuel efficiency larger than 40

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 Databases Questions!