Create a data definition class to model one product sold at a bakery. The product will have a description, cost, and quantity in stock. Instance methods include: accessors for each instance variable, non-validating mutators for each non-numeric instance variable, validating mutators for each numeric instance variable, and a special purpose method called sell. The sell method must accept an integer parameter indicating the product quantity to be purchased. Note: A product cannot be sold if there is not enough in stock. The bakery opens with 50 of each product in stock and all products are less than $5. Remember you are modeling ONE product only!

Answers

Answer 1

Answer:

hhhhhhhhhhhhhhhhhhhhhhhhhh

Explanation:


Related Questions

One of your professors has asked you to write a program to grade her midterm exams, which consist of only 20 multiple-choice questions. Each question has one of four possible answers: A, B, C, or D. Create a file "CorrectAnswers.txt" and write the correct answers for each question on a separate line so that the first line contains the answer to the first question, the second line contains the answer to the second question, and so forth. Similarly, create a file "StudentAnswers.txt" and write the student’s answers for each question on a separate line. Write a program that reads the contents of the CorrectAnswers.txt file into a char array, and then reads the contents of file StudentAnswers.txt into a second char array. The program should determine the number of questions that the student answered correctly and then display the following: • The total number of questions answered correctly. • The percentage of questions answered correctly. • If the percentage of correctly answered questions is 75% or greater, the program should indicate that the student passed the exam. Otherwise, it should indicate that the student failed the exam.

Answers

Answer:  

Here is the program that determines the number of questions that the student answered correctly.

#include <iostream>  //to use input output functions

#include <fstream>  // to handle files

#define size 20  //size of questions is fixed to 20

using namespace std;   //to identify objects cin cout

int correctAnswers(char answers[], char correct[]);  //to count correct answers given by student

   int main(){    //start of main function

       char correct[size];         // array stores correct answers

       char answers[size];       //stores answers of students

       int result;                     //stores the correct answers result of student

       double percentage;   //stores the percentage of correct answers

       int counter;        //counts number of correct answers given by student  

       ifstream reader("CorrectAnswers.txt");  //reads the contents of CorrectAnswers.txt file

       if(!reader){  //if file cannot be read/opened

           cout<<"Cannot open the file"<<endl; //displays error message

           return 0;        }          

       counter = 0;    //sets counter to 0 initially

       while( (reader>>correct[counter++]) && counter < size  );    //reads each answer from CorrectAnswers.txt  and stores it in char array correct[] at each iteration of while loop

       reader.close();  //closes the file

       reader.open("StudentAnswers.txt");    //opens StudentAnswers.txt file  

       if(!reader){   //if file could not be opened

           cout<<"Cannot open file"<<endl;   //displays this error message

           return 0;          }          

       counter = 0;    //sets counter to 0

       while( (reader>>answers[counter++]) && counter < size );   //reads each answer from StudentAnswers.txt  and stores it in char array answers[] at each iteration of while loop    

       result = correctAnswers(answers,correct);  //calls correctAnswers method to compute the correct answers given by student and stores the result of correct answers in result variable

       percentage = 100.0*result/size;   //computes percentage of correct answers of student    

       cout<<"The total number of questions answered correctly: "<<result<<endl;     //displays total no of qs answered correctly

       cout<<"The percentage of questions answered correctly: "<<percentage<<" %"<<endl;  //displays computed percentage

       if( percentage >= 75 ){  //if percentage of correctly answered questions is 75% or greater

           cout<<"Student has passed the exam!"<<endl;   } //displays that the student passed the exam

      else { //if percentage of correctly answered questions is below 75%

           cout<<"Student has failed the exam!"<<endl;         }  //displays that the student failed the exam

       return 0;     }  

   int correctAnswers(char answers[], char correct[]){   //method to compute the number of correct answers  

       int countCorrect = 0;   //stores the count of correct answers

       for(int i=0; i<size; i++){  //iterates 20 times to match answers from both the files of 20 questions

           if( answers[i] == correct[i] ){  // if the student answer in StudentAnswers.txt file matches with the correct answer given in CorrectAnswers.txt file

               countCorrect++;              }         }     //adds 1 to the countCorrect every time the student answer matches with the correct answer

       return countCorrect;     }  //returns the number of questions that the student answered correctly

Explanation:

The program is well explained in the comments mentioned with each line of code.

Here are the two files that can be used to check the working of the above program. You can create your own text files too.

     CorrectAnswers.txt :

A

A

B

D

C

C

A

C

D

D

A

B

A

B

B

C

A

C

C

B

StudentAnswers.txt

A

C

B

D

C

C

B

C

D

C

D

B

A

B

B

C

A

C

C

B      

Also if the number of wrong answers are to be displayed then add this method to the above code:

void wrongAnswers(char answers[], char correct[]){  //method takes two arrays one with correct answers and the other with student answers

       for(int i=0; i<size; i++){ //iterates 20 times

           if( answers[i] != correct[i] ){ //if the answer by student does not match with correct answer

               cout<<"Question Number: "<<i+1<<endl; //the question that is answered incorrectly

               cout<<"Correct answer is: "<<correct[i]<<endl;  //displays the correct answer

               cout<<"Student answer is: "<<answers[i]<<endl;    }    }    } //displays the answer that student gave

Now call this method in main() as:

if(result < size){  //if result is less than size i.e. 20

           cout<<"The questions answered incorrectly"<<endl;  //number of questions that are answered incorrectly

           wrongAnswers(answers,correct);  //calls method to compute the wrongly answered questions

       }else{  //if result is not less than size

           cout<<"No incorrect answers."<<endl;       }    //no questions incorrectly answered      

       cout<<"Number of missed questions: "<<size-result<<endl; //displays the number of missed questions

The screenshot of the output is attached.

Create and Provide complete program that includes a comments header with your name, course, section and other program details and does the following: 1) prompt the user to provide a side of square 2) get side from the user and store it into variable 3) based on the side value calculate perimeter of the square 4) calculate area of the square 5) calculate diameter of the square The program should provide the following output: Enter the side of a square: 12 The perimeter is 48.0 The area is 144.0 The length of the diagonal is 16.97056274847714

Answers

Answer:

Written using C++

/*Enter Your Details Here*/

#include<iostream>

#include<cmath>

using namespace std;

int main()

{

//1

float side;

cout<<"Enter the side of a square: ";

//2

cin>>side;

//3

float perimeter = 4 * side;

cout<<"The perimeter is "<<perimeter<<endl;

//4

float area = side *side;

cout<<"The area is "<<area<<endl;

//5

float diagonal = sqrt(2 * side * side);

cout<<"The length of the diagonal is "<<diagonal;

return 0;

}

Explanation:

I've added the full source code as an attachment where I used more comments to explain difficult line

The macro command is available on the ___ tab
Home
Insert
View
Design

Answers

Answer:

The marco command is available on the VIEW tab.  

Your welcome!!!

A user can easily moved to the end of document by pressing what key combination?
Ctrl+Down
Ctrl+end
Ctrl+E
Alr+end

Answers

Which element is located on the top left of the Word screen? Quick Access toolbar

Which key combination will move the user to the beginning of the document? Ctrl+Home

A user can easily move to the end of a document by pressing the _____ key combination. Ctrl+End

Television broadcasts were originally delivered by using which technology

Answers

Answer:

Wireless technology.

Explanation:

In earlier years, the broadcasting of information or any video or audio type was done "over-the-air". This means that sharing or the distribution of any content was done "wireless", through the use of transmitters that are wireless or requires no physical connecting wires.

Wireless technological form of broadcasting became the original form of distributing media, be it entertainment, news or information, etc. This 'over-the-air' broadcasting was then replaced by the cabled-wires transmission later on.

The technology through which Television broadcasts were originally delivered was through:

Wireless technology.

According to the given question, we are asked to state the technology through which Television broadcasts were originally delivered

As a result of this, we can see that in the earlier years, there was the use of wireless technology to relay the transmissions of information through radio waves or short waves and did not require any physical connection of wires.

'Read more about Wireless technology here:

https://brainly.com/question/25633298

Which of the following statements is true of subroutines? Check all that apply.
They can be used in multiple places.
They can be used in one place only.
They save a programmer time since they are reusable.
They can be used only once.
They can contribute to excessive use of a computer’s resources.

Answers

They can be used in multiple places.

They save a programmer time since they are reusable.

They can contribute to excessive use of a computer’s resources.

:)

Give an example of a class and an example of an object. Describe what a class is, what an object is, and how they are related. Use your examples to illustrate the descriptions.

Answers

Answer:

Science. Science is where you learn about the worlds enviroment.

Book. A Book is a object that has words in it that you can read. It has sometimes thick pages or thin pages.

Write an application that accepts a word from a user and converts it to Pig Latin. If a word starts with a consonant, the Pig Latin version removes all consonants from the beginning of the word and places them at the end, followed by ay. For example, cricket becomes icketcray. If a word starts with a vowel, the Pig Latin version is the original word with ay added to the end. For example, apple becomes appleay. If y is the first letter in a word, it is treated as a consonant; otherwise, it is treated as a vowel. For example, young becomes oungyay, but system becomes ystemsay. For this program, assume that the user will enter only a single word consisting of all lowercase letters.

Answers

Answer:

Written in Python

word = input("Word: ")

if(word[0]=='a' or word[0]=='e' or word[0]=='i' or word[0] =='o' or word[0]=='u'):

     print(word+"ay")

else:

     a = word[1:]

     print(a+word[0]+"ay")

Explanation:

The program was written in Python and I've added the explanation as an attachment; where I used comments as explanations

Which of the following changes would be LEAST LIKELY lead to economic growth in a country?
A. declines in labor productivity B. increases in education level C. investment in more equipment D. innovations in technology

Answers

Answer:

A. declines in labor productivity

Explanation:

What line of code will import matplotlib in it

Answers

Answer:

import matplotlib

Explanation:

The pieces of a line between nodes are called blank of the line
A Curves
B. Strokes
С. Handles
D. Segments

Answers

The answers is D. Segments

Answer:

the correct graph is the one that shows a horizontal segment, followed by a positive slope segment, followed by a flat segment, and then a negative slope segment that is option B.

What is graph?

In mathematics, a graph is a visual representation of a set of objects and the connections between them. The objects, which are often called vertices or nodes, are typically represented by points or circles on the graph. The connections between the objects, which are often called edges or arcs, are typically represented by lines or curves connecting the points or circles.

Here,

To represent Marie's situation in a graph, we need to plot her golf cart's distance from the first hole over time. Let's analyze the given information to determine what the graph should look like.

For the first 30 minutes, Marie stayed at the first hole, so her distance from the first hole would be 0 during that time.

For the next 2 hours, Marie drove away from the first hole. Her distance from the first hole would increase during this time.

After 2 hours of driving, Marie stopped for lunch. Her distance from the first hole would remain constant during this time.

After lunch, Marie took 2 more hours to drive back to the first hole. Her distance from the first hole would decrease during this time.

The x-axis represents time in hours, and the y-axis represents distance from the first hole in miles. The graph starts at the origin, where the golf cart stays for the first 30 minutes, and then goes up with a positive slope for 2 hours as the golf cart moves away from the first hole. Then, the graph remains flat for 1 hour during lunch, before going down with a negative slope for 2 hours as the golf cart returns to the first hole.

As a result, the right graph is option B, which displays a horizontal section followed by a positive slope segment, a flat segment, and then a negative slope segment.

Explanation:

How do computers use input and output to get and give the information that they need to solve problems?

Answers

Answer:

typing on a keyboard (input) makes letter appear on a screen (output)is removing that

In this exercise we have to be able to explain the difference between output and input used in computers, like this:

So the output allows some information to appear on the screen while the input is a string.

In this way we will define some characteristics of each one as:

Output devices are devices that display data and information processed by the computer, also called output units (input/output). In other words, they allow communication from the computer to the user. Examples: video projector, printer and monitor.

The input() function receives as a parameter a string that will be shown as an aid to the user, usually informing him what kind of data the program is expecting to receive.

What is the difference between Input and Output?

Input, means: Contribute, Input, Insert and etc. In the case of Output, its meaning is: Output, Production, Power, Send.

See more about input or output at brainly.com/question/408477

Which of the following option is not available in Insert>>Picture?

Question 10 options:

Chart


Word art


Clip art


Graph

Answers

Answer:

Word art

Explanation:

its copy and paste

Answer:

Graph

Explanation:

I took the quiz it is the right answer.


How would you explain a number system to someone who had never seen numbers before

Answers

Answer:

Use a number of items (likes apples) to show the amount each number correlates to.

Explanation:

Assume you have a sorting algorithm that you can use as a black box (that means it is already written and you just call it and use it). We use the sorting algorithm and sort the input list. Now consider the sorted list and write an algorithm to count the number of duplicates again. Analyze the time complexity of your algorithm in the worstcase (ignore the time complexity of sorting). Could you improve the worst-case time complexity of your algorithm compared to the previous question?Why? Explain

Answers

Answer:

Follows are the solution to this question:  

Explanation:

In the previous algorithm has also been fine yet un optimal and also gives O(n^2) computation time, that is is very powerful. It is a proposed algorithm, that has been arriving because its method has also been defined, its sorting provides the O( nlogn), which is much better than the last time complexity.  

When did I consider repeat figures, it is another aspect to note at the same figures arise as figures are ordered, for instance, the number is 1, 2, 1, 3, 2, 1, 3.  It becomes such as these number once sorted  1 , 1 , 1, 2 , 2 , 3 , 3.  

The smaller number 1, that's also 3 times combined in the second-largest amount, which is 2 times, but instead number 3, that's 2 times together consequently, with one pass in series, they can conveniently check the amount of duplicate.

It is a particular characteristic that appears 2 or more times, so it gets the same increases and amount for multiple copies when it sorted, and search for a specific transaction if it is equal with the original weeks.  If there is indeed a problem we have an amount more than 2 times for the same amount we need additional iterations.  

Therefore, the second 1 method fits it's very first 1 and its increase in multiple copies, however, the third 1 is the same for the second 1, so the amount of double for step 1 was already increased again so the same number also has an element following.  To remove this problem, a hashmap keeps track as a number, which crossed 1 time must be initialized the algorithm and doesn't search for amount again.

The algorithm functions as follows:  

1.initialize a hashmap which defaults to 0.  

2.Now sorted array with the second position element.  

3.Check if the element hashmap value is 0 as well as the previous variable has the same value.  

4. Increase the number of multiple copies and fill out hazmap element to 1 if both conditions and AND conditions become valid.  

5. if  the element and move to the next item if the state of AND is wrong.  

6. go to 3 and take the same steps to the end of the array.

Write three tasks students can perform in a digital classroom.

Answers

Students can perform several tasks in a digital environment. For example, they can watch instructional videos, take notes, and participate in peer discussions.

A digital classroom is a study space that has been electronically improved and allows students to use the internet and web-based applications to improve their learning.

What is digital classroom?

A digital classroom is one that improves student learning by utilizing computers, tablets, the internet, and instructional software.

The digital classroom can be a supplement to the physical classroom, offering more chances for study and cooperation.

A digital classroom is a learning environment that has been enhanced electronically so that students can access the internet and web-based tools to enhance their learning.

The following tasks could be carried out in such a setting:

Using apps for meetings and online forums to collaborate with colleagues.The ability to access more educational content and materials from pertinent websites and applications.Online tests and assignments allowed for real-time progress monitoring for students.

Thus, a digital classroom's capabilities give students the resources they need for easier, more seamless learning.

For more details regarding digital classroom, visit:

https://brainly.com/question/4178835

#SPJ6

Write a program that calls fork(). Before calling fork(), have the main process access a variable (e.g., x) and set its value to some-thing (e.g., 100). What value is the variable in the child process? What happens to the variable when both the child and parent change the value of x? Write out the code to your program. Run the program and show your result. What value is the variable in the child process? What happens to the variable when both the child and parent change the value of x?

Answers

Answer:

Here is the program:

#include <stdio.h>  //to use input output functions

#include <unistd.h> //provides access to the POSIX OS API

int main() { //start of main function

   int x;  //declare an int type variable x

   x = 100;  // sets the value of x to 100

   int r = fork();  //calls fork() method to create a new process. r is used to store the value returned by fork()

   if(r<0){  //if fork() returns -1 this means no child process is created

           fprintf(stderr, "Error");}     //prints the error message using standard error stream

  else if (r == 0)     {  //if fork returns 0 this means child process is created

       printf("This is child process\n");  //prints this message

       x = 150;  //changes value of x to 150

       printf("Value of x in child process: %d\n", x);     }  //prints the new value of x in child process

   else      {

       printf("This is parent process\n");  //if r>0

       x = 200;  //changes value of x to 200

       printf("Value of x in parent process: %d\n", x);     }  } //prints the new value of x in parent process

Explanation:

The program is well explained in the comments added to each line of the code. The answers to the rest of the questions are as follows:

What value is the variable in the child process?

The variable x is set to 150 in child process. So the printf() statement displays 150 on the screen.

What happens to the variable when both the child and parent change the value of x?

fork() creates a copy of parent process. The child and parent processes have their own private address space. Therefore none of the both processes cannot interfere in each other's memory. The both maintain their own copy of variables. So, when parent process prints the value 200 and child process prints the value 150.

In order to see which is the final value of x, lets write a statement outside all of the if else statements:

  printf("Final value of x: %d\n", x);

This line is displayed after the value of parent class i.e. 200 is printed on the screen and it shows:

Final value of x: 200

Note this is the value of x in parent process

However the same line displayed after the value of child class i.e. 150 is printed on the screen and it shows:

Final value of x: 150

The screenshot of the program along with the output is attached.

In this exercise we have to use the knowledge of computational language in C code to describe a code, like this:

The code can be found in the attached image.

To make it easier the code can be found below as:

#include <stdio.h>

#include <unistd.h>

int main() {

  int x;

  x = 100;

  int r = fork();

  if(r<0){  

          fprintf(stderr, "Error");}  

 else if (r == 0)     {

      printf("This is child process\n");

      x = 150;

      printf("Value of x in child process: %d\n", x);     }

  else      {

      printf("This is parent process\n");

      x = 200;  

      printf("Value of x in parent process: %d\n", x);     }  }

See more about C code at brainly.com/question/25870717

Which of the following is NOT true about adjustment layers? brainbuffet

Answers

Answer the adjustment layers can not be used a lot?

Explanation: i think that was it

Answer:

Initial settings can not be modified, only layer opacity.

Explanation:

The word wrap feature

Question 9 options:

Automatically moves text to the next line when necessary


Appears at the bottom of the document


Allows you to type over text


Is the short horizontal line

Answers

Answer:

automatically moves the text to the next line if necessary

Answer:

automatically moves text to the next line when necessary

What feature adjusts the top and bottom margins so that the text is centered vertically on the printed page?

Question 6 options:

Vertical centering


Vertical justifying


Vertical adjusting


Dual centering

Answers

Answer:

Vertical justifying

Explanation:

Which of these devices must be installed in every individual computing device on the
network? Choose the answer.
network adapter
router
switch
repeater

Answers

The answer is network adapter:)

Answer:

network adapter

Explanation:

took the test

Where do you go to create a workbook?​

Answers

Answer:

The explaination of this question is given below in the explanation section

Explanation:

The following steps are used to create a workbook.

1- Go to start menu and search about EXCEL (application software) and then click on it to open.

If you already opened a EXCEL's workbook, and you want to create a new workbook, then you follow the following steps:

Click the File tab. Click New. Under Available Templates, double-click Blank Workbook. Keyboard shortcut To quickly create a new, blank workbook, you can also press CTRL+N.

A new workbook will be created.

in terms of technology what is software defined as ?

Answers

Answer:

the ability to control some or all of the functions of a system using software.

Explanation:

I'm Not Sure How To Explain But The Answer Is Verified. ✔️

Answer:

Is a computer’s applications and programs.

Explanation:

Basic definition

Microsoft Word is ________________ software.

Question 1 options:

Application


Compiler


System


Programming

Answers

Answer:

Application

Explanation:

Word is used to change things and make things

Maxwell says three things Level Two Leaders do well are:
O Recruit people, equip people, and place workers in the right place.
Position others in the correct departments, listen to others, and equip others.
Equip people well, let go of controlling others, and compound others.
Listen to others, observe what others do, learn to serve others.

Answers

Answer:

true

Explanation:

What is the importance of computer application to statistics​

Answers

Answer:

First off, I'm not writing your essay. I will give you a guide and you can take it from there. Also, I don't know any context about the question.

Computer applications can handle input and output at a significant rate. Computers were designed to handle mathematical operations and now at today's rate a single 2+2 can spit out a answer in 64 nanoseconds.

Which of the following best describes a server?

-a computer that provides special services to client computers on demand
-a computer that requests special services from a client computer
-a computer that is not part of a network
-a computer that also functions as a printer

Answers

Answer:

The answer is A-a computer that provides special service to client computers on demand.

Explanation:

Edge 2020

A computer that provides special services to client computers on demand is best describes a server. Hence, option A is correct.

What is server?

A computer program or appliance that serves a remote server and its user, also known as the client, is referenced to as a server. The actual computer that a server program runs on in a data centre is also frequently referred to as a server.

Any server, network computer, software, or device that handles client requests, see client-server architecture. For instance, a Web server on the World Wide Web is a computer that utilizes the HTTP protocol to transfer Web pages to a client's computer in response to a client request.

Data is sent, received, and stored by a server. It basically serves another purpose and is there to offer services. One or more services may be offered via a server, which can be a computer, software application, or even a storage device.

Thus, option A is correct.

For more details about server, click here:

https://brainly.com/question/7007432

#SPJ2

Test Average and Grade
Write a program that asks the user to enter five test scores. The program should display a
letter grade for each score and the average test score. Write the following methods in the
program:
calcAverage:
This method should accept five test scores as arguments and return the
average of the scores.
determineGrade:
This method should accept a test score as an argument and return a
letter grade for the score, based on the following grading scale:
Score Letter Grade
90-100 A
80-89 B
70-79 C
60-69 D
Below 60 F
Expected Output:
Enter·test·grade·for·student·1:55↵ ·
Enter·test·grade·for·student·2:65↵ ·
Enter·test·grade·for·student·3:75↵ ·
Enter·test·grade·for·student·4:85↵ ·
Enter·test·grade·for·student·5:95↵ ·
The·letter·grades·are·as·follows:↵
Student·1:·F↵
Student·2:·D↵
Student·3:·C↵
Student·4:·B↵
Student·5:·A↵
The·average·grade·was:·75.00↵
ISSUES: PLEASE HELP:
I can not get the student's letter grade to display correctly;
I can not get the average to calculate correctly;
Instructions states to write the METHODS in the program.
My output:
Enter test grade for student 1:50
Enter test grade for student 2:60
Enter test grade for student 3:70
Enter test grade for student 4:80
Enter test grade for student 5:90
The letter grades are as follows:
Student 0.0F
Student F
Student F
Student F
Student F
Average:0.0
My Code:
import java.util.Scanner;
public class TestAveGrade{
public static double calcAverage(double userScore1, double userScore2, double userScore3, double userScore4, double userScore5){
double average;
average = (userScore1 +userScore2 +userScore3 +userScore4 +userScore5) /5;
return average;
}
public static String determineGrade(double testScore){
String letterGrade = " ";
if (testScore < 60){
letterGrade = "F";
} else if (testScore <70) {
letterGrade = "D";
}else if (testScore <80) {
letterGrade = "C";
}else if (testScore <90) {
letterGrade = "B";
}else if (testScore <100) {
letterGrade = "A";
}
return letterGrade;
}
public static void main( String [] args) {
Scanner scanner = new Scanner( System.in );
int numberOfScores = 5;
double userScore;
double userScore1 = 0;
double userScore2 = 0;
double userScore3 = 0;
double userScore4 = 0;
double userScore5 = 0;String outputString = "The letter grades are as follows:\n";for(int currentScore = 1; currentScore <= numberOfScores; currentScore++){System.out.print ("Enter test grade for student " + currentScore+":");userScore = scanner.nextDouble();switch (currentScore) {case 1:userScore1 = userScore1;outputString += "Student "+ userScore1 + determineGrade( userScore1) +"\n";break;case 2:userScore2 = userScore2;outputString += "Student "+ determineGrade (userScore2) + "\n";break;case 3:userScore2 = userScore3;outputString += "Student "+ determineGrade (userScore3) + "\n";break;case 4:userScore2 = userScore4;outputString += "Student "+ determineGrade (userScore4) + "\n";break;case 5:userScore2 = userScore5;outputString += "Student "+ determineGrade (userScore5) + "\n";break;default:break;}}System.out.print( outputString + "Average:" + calcAverage (userScore1, userScore2, userScore3, userScore4, userScore5));}}

Answers

Answer:

import java.util.Scanner;

public class TestAveGrade

{

public static void main(String[] args) {

 Scanner scanner = new Scanner( System.in );

       double userScore1, userScore2, userScore3, userScore4, userScore5;

       

       System.out.print ("Enter test grade for student1:");

       userScore1 = scanner.nextDouble();

       System.out.print ("Enter test grade for student2:");

       userScore2 = scanner.nextDouble();

       System.out.print ("Enter test grade for student3:");

       userScore3 = scanner.nextDouble();

       System.out.print ("Enter test grade for student4:");

       userScore4 = scanner.nextDouble();

       System.out.print ("Enter test grade for student5:");

       userScore5 = scanner.nextDouble();

       

       System.out.println("The letter grades are as follows:");

       System.out.println("Student-1: " + determineGrade(userScore1));

       System.out.println("Student-2: " + determineGrade(userScore2));

       System.out.println("Student-3: " + determineGrade(userScore3));

       System.out.println("Student-4: " + determineGrade(userScore4));

       System.out.println("Student-5: " + determineGrade(userScore5));

           

       System.out.printf("The average grade was: %.2f", calcAverage (userScore1, userScore2, userScore3, userScore4, userScore5));

}

public static double calcAverage(double userScore1, double userScore2, double userScore3, double userScore4, double userScore5){

       double average;

       average = (userScore1 +userScore2 +userScore3 +userScore4 +userScore5) /5;

       return average;

   }

   public static String determineGrade(double testScore){

       String letterGrade = " ";

       if (testScore < 60){

           letterGrade = "F";

       }

       else if (testScore <70) {

           letterGrade = "D";

       }

       else if (testScore <80) {

           letterGrade = "C";

       }

       else if (testScore <90) {

           letterGrade = "B";

       }

       else if (testScore <100) {

           letterGrade = "A";

       }

       return letterGrade;

   }

}

Explanation:

Hi, I modified your code. Your methods work but you need to update the main.

Ask the user to enter five grades and store the values in different variables

Call the determineGrade method passing each grade as a parameter

Call the calcAverage method passing all the grades as parameter

18. When you turn off the power to a computer and unplug it at night, it loses the date, and you must reenter it each morning. What is the problem and how do you solve it?

Answers

Answer:

If this is a Mac, it's a common problem and there isn't anything to fix it because it's just like that. I reccomend unplugging the computer and NOT signing off. Because of that, that may be why it is the problem for you. I do not know about Windows Computers, but this is some info that applies with all computers.

Explanation:

Answer:

this is what the battery on your motherboard is for. Also as long as you are connected to wifi, then it will sync your computer time with the current timezone you are in.

Explanation:

In a word processing program, under which tab or menu option can you adjust the picture brightness? A. Insert B. Format C. View D. Page Layout

Answers

Answer:

B. Format

Explanation:

You must have selected a picture in order the tab Format to be available. You should click the picture that you want to change the brightness for and u under Picture Tools, on the Format tab, in the Adjust group, click Corrections. And the correct option is the Format tab.

Other Questions
What is a land breeze?air that travels in a curved pathair that blows at night over short distancesair that flows steadily in different directionsair that blows from the poles to the equator Why is the Roman Rules important? When doing jump rope activities this type of stretch is important to add to your warm-up. An investor considers investing $10,000 in the stock market. He believes that the probability is 0.30 that the economy will improve, 0.40 that it will stay the same, and 0.30 that it will deteriorate. Further, if the economy improves, he expects his investment to grow to $15,000, but it can also go down to $8,000 if the economy deteriorates. If the economy stays the same, his investment will stay at $10,000.a. What is the expected value of his investment Consider two different implementations of the same instruction set architecture. The instructions can be divided into four classes according to their CPI (class A, B, C and D). P1 with a clock rate of 3GHz and CPIs of 3, 2, 1, 4, and P2 with a clock rate of 2.5GHz and CPIs of 2, 2, 2, 2.Processor Class A Class B Class C Class DP1 3 2 1 4P2 2 2 2 2Given a program with a dynamic instruction count of 1.0E5 instructions divided into classes as follows: 10% class A, 30% class B, 40% class C, and 20% class D.1. Which implementation is faster?2. What is the global CPI for each implementation?3. Find the clock cycles required in both cases? pls answer need help I need to write the fraction 30/70 in simplest form What is the simplest form of x^4 y^7 / 3 square root x^10 y^4 Question 10 of 15Match the era on the left with its characteristic on the right.PaleozoicWhen Earth's atmosphereformedMesozoic?Ended with a massiveimpactPrecambrian?When oxygen-breathingorganisms first thrivedCenozoic?Began about 65 millionyears ago what is the 2 plus 3 times 14 just by looking at the images, what would be your guess of how many fish food boxes can fit into the shipping box? How did you determine that? There is no right or wrong answer.pls pls pls HELPP Mackenzie borrows $300,000 from the bank on a 30 year mortgage. She is given an interest rate of 5.125% APR. How much will her monthly payment be in principal and interest?Question 1 options:988.181633.461699.111689.211755.29 Please help grades are due today!!! What is the correct relationship between a molecule and a compound? *2 pointsAll molecules are compounds, but not all compounds are molecules.All compounds are molecules, but not all molecules are compounds.Only compounds make a molecule.Only molecules make a compound. Escoge el cognado falso. Choose the false cognate.A. CarpetaB. MsicaC. Artstica D. Regla in 2010, the continent of south america has a population of 395,280,204. which of the following is the closest estimate of this number? A 3x10^8 B 4x10^7 C 4x10^8 or D 4x 10^9 Which of the following is not a common characteristic of life/living things.Question 2 options:a.growth and developmentb.abiliity to reproduce speciesc.motility - movement from place to placed.response to environment the price of a new pair of sneakers is $79.95. if sales tax is 7.5%, then approximately, how much tax will be paid on sneakers? PLEASE HELP :/george walks to a friend's house. he walks 750 meters north, then realizes he walked too far he turns and walks 250 meters south. the entire walk takes him 50 seconds whats his distance and displacement? 1500 students in class and 1200 are present what is percentage of absent?