Starting from:

$25

CSE021-Lab 3 Solved

1)      

a.      Similar to when MAXCHEESE = 10, when MAXCHEESE = 20, the for loop will continue until it gets to its end when MAXCHEESE = 19

b.      The data type of names is int, prices is double, and amounts is double

c.      There is only 1 entry.

d.      All of them are invalid.

e.                  System.out.println(“Cheese ” + ‘A’ + 10); = Cheese A10

System.out.println(“Cheese ” + (char)‘A’ + 10); = Cheese K

System.out.println(“Cheese ” + (int)‘A’ + 10); = Cheese 75

System.out.println(“Cheese ” + (char)(‘A’ + 10)); = Cheese K

System.out.println(“Cheese ” + (int)(‘A’ + 10)); = Cheese 75

f.       Since the first 3 cheeses are already declared with actual names, it would make most sense to continue from i = 3 to continue the for loop.

2)     I copied the some parts of the invalid inputs because they needed to be the same as well as some parts of the itemized list and the total lists. 

3)     I used all of Error.java for GenCheese.java and added more.

4)     I used 3 for loops.

5)     I used 2 different types of loops.

More products