Question: Write a loop that will continue to input int values from the user, adding each to the int value sum, and then ask if the

 Write a loop that will continue to input int values from

Write a loop that will continue to input int values from the user, adding each to the int value sum, and then ask if the user has another value to input, until the user says that there are no more values. Then output the average if one can be calculated; otherwise, print message stating no values were entered. A data verification loop is a loop that asks the user to input a value within a restricted range repeatedly until the user has input a value within the requested range. Write a data verification loop that that inputs an int value x within the range 0 and 100. A teacher wants a program to keep track of grades for students and decides to create a class called student for his program as follows: Each student will be described by three pieces of data; his/her name, his/her score on test #1, and his/her score on test#2. There will be one constructor, which will have three arguments-the name of the student and his/her test scores. Write the following methods: getName, which will return the student's name; inputGrades, which will prompt for and read in the student's test grades; getAverage, which will compute and return the student's average; and toString. Write the class Student. Write a main class Grades that will create an instance of the class Student print the information from the instance using the toString method implicitly, and print the students name and average. Write the code that will enable the user to input a phrase and will then count each vowel (separately) and spaces in a phrase inputted by the user. You must use a switch statement and a for loop. Write the code that will do the following: Allow the user to enter integer values until the user wants to stop - you will need to ask the user if they want to continue entering values; do NOT ask the user how many values they want to enter; Calculate and print the average of the numbers (you do not have to format the average); Calculate the sum of the values end the number of values entered; Do not allow your code to crash due to division by zero. The user doesn't have to enter any values

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!