Write a program called GradeBook.java. This program should do the following:
1. Prompt the user to enter 3 grades one at a time, and read them in using Scanner (assume the grades are integer numbers).
2. Compute the average of the 3 grades.
3. Print the resulting average (do not worry about rounding the result, just print the value with all of the decimal places).
Here is an example of what the program output will look like (bold-italics indicate user input):
Enter grade 1: 89
Enter grade 2: 93
Enter grade 3: 72
84.666666667
Write a program called CalculateSeconds.java. This program should do the following:
1. Prompt the user to enter her/his name.
2. Greet the user by name and ask to enter a number of years (assume it will be an integer).
2. Compute the number of seconds in the number of years entered by the user (this should be done by calling the numOfSeconds() method).
3. Print the resulting number of seconds as shown below.
The numOfSeconds() method will:
1. Take an integer value as the input parameters
2. Calculate the number of seconds in the given number of years (assume that each year has exactly 365 days, with 24 hours in each day). Note, that you would need to use long and not int for these calculations to be accurate for a large number of years!
3. Return the number of seconds (as a long, not an int).
output
Please enter your name:
Peter
Hello, Peter. Please enter the number of years:
15
There are 473040000 seconds in 15 years, Peter.
Write a program called GradeBookMethod.java. This program should do the following:
1. Prompt the user to enter 3 grades (assume the grades are integer numbers)
2. Compute the average of the 3 grades by calling a method, which you write, named: average( )
3. Print the resulting average (do not worry about rounding the result, just print the value with all of the decimal places)
The average( ) method will:
1. Take 3 integer values as the input parameters
2. Calculate the average of the three integers (what data type should the average be?)
3. Return the average.
Here is an example of what the program output will look like (bold-italics indicate user input):
Enter grade 1: 89
Enter grade 2: 93
Enter grade 3: 72
84.666666667
Ann, an accountant, reports that after turning on her new laptop, she received a message stating her IP address is already in use on the system. She tried going back to her old desktop, which she now only uses for email, but received the same message. As a Network expert, you checked the account and sees a comment that Ann requires a special network setup to connect to the banking software.
Explain what could be the cause of the message received by Ann, and how you would resolve the issue as a Network expert. Also, what “special network set-up” is required to connect to the Banking software.
Suppose that the input is 10 -6 12 -5 -4 0. What is the output of the following code?
int num;
int sum = 0;
cin >> num;
while (num != 0)
{
if (num>0)
sum = sum + num;
else
sum = sum - num;
cin >> num;
}
cout << ” Sum = ” << sum << endl;
Give a strategy for avoiding nested conditionals .
Explain why devices on a network need addresses