[Solved]Java Code Created Answer Question Import Javautilscanner Public Class Ipods Public Static Q37136546
Java code Created to answer this question:
import java.util.Scanner;
public class Ipods {
public static void main(String[] args){
// 10classes
int arr[] = newint[10];
Scanner sc = newScanner(System.in);
int i = 0,n;
//reading thequantity for each class
while (i < 10){
System.out.println(“Enter the number of Ipads required for class “+ (i + 1));
n = sc.nextInt();
// checking if the quantity is less than 20
if (n < 20) {
//storing in array
arr[i++] = n;
} else {
System.out.println(“Quantity must be less than 20”);
}
}
i = 0;
double total = 0,cTotal = 0;
while (i < 10){
//calculating the total bill
cTotal = arr[i] * 799;
//adding 8.2% tax
cTotal = 1.082 * cTotal;
//adding total
total += cTotal;
System.out.println(“Class ” + (i + 1) + ” total : $” +cTotal);
i++;
}
System.out.println(“Total Bill :$” + total);
}
}
Question states:
Modify your code to now have the formula you used tocalculate the total cost as method. Create an additional subclassusing the following parameters: (20 points)
- Create a Chromebook class
- Under the Chromebook class you created, ask the userthe number of Chromebooks they will need for eachclass.
- The Chromebooks cost $250.00 and the sales tax is8.2%.
Expert Answer
Answer to Java code Created to answer this question: import java.util.Scanner; public class Ipods { public static void main(String… . . .
OR

