Question
Exercise 1 : Write a Java program that determines a students grade. The program will read three types of scores(quiz, mid-term, and final scores) and
Exercise 1:
Write a Java program that determines a students grade.
The program will read three types of scores(quiz, mid-term, and final scores) and determine the grade based on the following rules:
-if the average score >=90% =>grade=A
-if the average score >= 70% and <90% => grade=B
-if the average score>=50% and <70% =>grade=C
-if the average score<50% =>grade=F
See the example output below:
Quiz score: 80
Mid-term score: 68
Final score: 90
Your grade is B.
Exercise 2:
Write a Java program to calculate the revenue from a sale based on the unit price and quantity of a product input by the user.
The discount rate is 10% for the quantity purchased between 100 and 120 units, and 15% for the quantity purchased greater than 120 units. If the quantity purchased is less than 100 units, the discount rate is 0%.
See the example output as shown below:
Enter unit price: 25
Enter quantity: 110
The revenue from sale: 2475.0$
After discount: 275.0$(10.0%)
Exercise 3:
Write a Java program to detect key presses.
If the user pressed number keys( from 0 to 9), the program will tell the number that is pressed, otherwise, program will show "Not allowed.(Using Switch Case)
Exercise 4:
Write a Java program to sum values of an array. (User must give the length of the array)
Exercise 5:
By using the bubble sort algorithm, write a Java program to sort an integer array of 10 elements in ascending.
Exercise 6:
By using the sequential search algorithm, write a Java program to search for an element of an integer array of 10 elements.
Exercise 7:
Write a Java program to answer about the statistical information such as arithmetic mean, median, mode, and standard deviation of an integer data set. The data points are input by the user from keyboard.(Mean, Median, Mode and Standard Deviation)
Exercise 8:
Write a Java program to insert an element (specific position) into an array
Exercise 9:
Write a Java program to find the maximum and minimum value of an array.
Exercise 10:
Write a Java program to reverse an array of integer values.
Exercise 11:
Write a Java program to find the duplicate values of an array of integer values
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started