Professional Documents
Culture Documents
/100
Page 1 of 4
CSCI250L Test 3 SPR 2020
Problem1 :
We want to create a java program to read the grades of 5 students, store it into an array
than display their average and the number of failed and passed students.
Page 2 of 4
CSCI250L Test 3 SPR 2020
a- Write a method that takes as parameters the product type and its quantity and returns the
corresponding whole price of product (price = type * quantity).
b- In the main, the user enters three products and the corresponding quantity. At the end, the
program displays the total price (some of the three products prices).
Sample Run 1:
Enter product type: C
Enter quantity: 2
Product C price = 13 $
Good Luck
Page 3 of 4
CSCI250L Test 3 SPR 2020
Page 4 of 4