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 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
Get step-by-step solutions from verified subject matter experts
