[Solved] Package Testipad Import Javautilscanner Public Class Ipadcost Public Static Void Main Stri Q37162156
package test.ipad;
import java.util.Scanner;
public class IpadCost {
public static void main(String[] args){
int numOfIpad; //this will be used to capture numberof ipads for a classroom
//below variables are given as per the question
double costOfIpadInDollar = 799;
double salsTaxInPercent = 8.2;
int totalNumOfClassroom = 10;
int maxNumOfIpadPerClass = 20;
// this array will be maintained to store totalcost ofipads including sales tax for every classroom
//since total number of classroom is defined hence thearray size is also bound to the number of clasroom
double[] totalIpadCostArr = newdouble[totalNumOfClassroom];
//below variables will be used to calculate for everyclassroom
doubletotalIpadOnlyCost,totalSalesTax,totalCostForClass;
int classroomCounter = 0;//counter will be used inwhile loop
Scanner sc = new Scanner(System.in); //scanner will beused to read teacher’s input
while(classroomCounter <totalNumOfClassroom){
System.out.println(“Please enterthe number of Ipad needed for classroom#”+(classroomCounter+1)+”:”);
//since the read data in Stringformat hence need to convert itt to integer.
numOfIpad =Integer.parseInt(sc.next());
if(numOfIpad >maxNumOfIpadPerClass){ //as the entered data cannot exceed 20
System.out.println(“Number of ipad cannot exceed”+maxNumOfIpadPerClass+” per class!!”);
//classroom counter is notincremented here. so it will again prompt the user for theinput.
}else {
//calculationlogic for totalcost
totalIpadOnlyCost = numOfIpad*costOfIpadInDollar;
totalSalesTax =totalIpadOnlyCost*(salsTaxInPercent/100);
totalCostForClass = totalIpadOnlyCost+totalSalesTax;
//the total costis stored in array to use that value later
totalIpadCostArr[classroomCounter] = totalCostForClass;
classroomCounter++;//go for next classroom’s data
}
}
sc.close();//close the scanner
//print each classroom’s cost
for(int i = 0; i < totalIpadCostArr.length ;i++){
System.out.println(“Total ipad costfor classroom#”+(i+1)+ ” is $”+totalIpadCostArr[i]);
}
}
}
I solved part A-B
i need help solving the bottom portion. my code is posted above.(TEST CASE, ARRAY LIST)
Language JAVA
create the Java code with the below criteria to be executed without errors: (20 points) a. You must use a while loop to get the teacher’s input for the number of iPads needed b. You must use an if/else statement to ensure the number of iPads can’t exceed 20. c. Provide the modified code or a screenshot of the code in Jdoodle. You are in charge of the school’s IT department and several classes are asking to by iPads for use in their classes. Based on the number of iPads each class requested, determine the total costs for each classroom. The only information given is that the iPad costs $799, sales tax is 8.2% and there is a total of 10 classrooms. HINT: You will need to get the teacher’s input for the amount that their class will need. Create a test case table with at least 5 test cases. Execute each test case and provide a screenshot of the execution .Create an array list of students’ first and last names for each of the 10 classrooms. The number of students in the class has to be greater than 10 but less than 20. Provide the modified code or a screenshot of the code in Jdoodle. Based on the number of inputs used for each classroom, remove student’s name from the array list so that the number iPads reflect the number of students in the class. Provide the modified code or a screenshot of the code in Jdoodle. Modify your code to now have the formula you used to calculate the total cost as method. Create an additional subclass using the following parameters: (20 points) 1) Create a Chromebook class 2) Under the Chromebook class you created, ask the user the number of Chromebooks they will need for each class. 3) The Chromebooks cost S250.00 and the sales tax is 8.2%. 4) Call the method you created for total cost formula, modify it with the new cost and tax information and print the output. 5) Provide a screenshot of the code and output and attach to your document. Show transcribed image text create the Java code with the below criteria to be executed without errors: (20 points) a. You must use a while loop to get the teacher’s input for the number of iPads needed b. You must use an if/else statement to ensure the number of iPads can’t exceed 20. c. Provide the modified code or a screenshot of the code in Jdoodle. You are in charge of the school’s IT department and several classes are asking to by iPads for use in their classes. Based on the number of iPads each class requested, determine the total costs for each classroom. The only information given is that the iPad costs $799, sales tax is 8.2% and there is a total of 10 classrooms. HINT: You will need to get the teacher’s input for the amount that their class will need. Create a test case table with at least 5 test cases. Execute each test case and provide a screenshot of the execution .Create an array list of students’ first and last names for each of the 10 classrooms. The number of students in the class has to be greater than 10 but less than 20. Provide the modified code or a screenshot of the code in Jdoodle. Based on the number of inputs used for each classroom, remove student’s name from the array list so that the number iPads reflect the number of students in the class. Provide the modified code or a screenshot of the code in Jdoodle. Modify your code to now have the formula you used to calculate the total cost as method. Create an additional subclass using the following parameters: (20 points) 1) Create a Chromebook class 2) Under the Chromebook class you created, ask the user the number of Chromebooks they will need for each class. 3) The Chromebooks cost S250.00 and the sales tax is 8.2%. 4) Call the method you created for total cost formula, modify it with the new cost and tax information and print the output. 5) Provide a screenshot of the code and output and attach to your document.
Expert Answer
Answer to package test.ipad; import java.util.Scanner; public class IpadCost { public static void main(String[] args){ int numOfIp… . . .
OR

