Question

1. Declare/define the variable/constant as indicated: a. a variable to store the grade for a student...

1. Declare/define the variable/constant as indicated:

a. a variable to store the grade for a student (as whole number)

b. a variable to store a letter grade for a course, like A, B, or C

c. a variable to store an average for a student (may have decimal places)

d. a variable to represent if a student passed the course or not, with a value of TRUE or FALSE e. a constant to represent the passing grade of 65

Homework Answers

Answer #1
a. a variable to store the grade for a student (as whole number)
int grade;

b. a variable to store a letter grade for a course, like A, B, or C
char letterGrade;

c. a variable to store an average for a student (may have decimal places)
double average;

d. a variable to represent if a student passed the course or not, with a value of TRUE or FALSE
In C/C++:
bool passed;
In Java:
boolean passed;

e. a constant to represent the passing grade of 65
In C/C++:
const int GRADE = 65;
In Java:
final int GRADE = 65;
Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Write the following program in MIPS: a) declare an array A of the following numbers: 3,...
Write the following program in MIPS: a) declare an array A of the following numbers: 3, 5, 8, 10, 12, 2, 76, 43, 90, 44 b) declare a variable called size which stores the number of element in array A, that is 10. c) write a subroutine to search for a number stored in an array and return true or false. In C++ the subroutine is as follows: search(array, size, number_To_Search) e.g. search(A, 10, 12) The subroutine should return 0...
practice 1 Grade practice 2 Grade 95 85 85 95 80 70 70 65 60 70...
practice 1 Grade practice 2 Grade 95 85 85 95 80 70 70 65 60 70 The table above shows the first two practice grades for five students. Use this data to answer the next four questions. a) Calculate the correlation coefficient. Round to two decimal places b)Find the linear regression equation, treating practice 1 as x and practice 2 as y. What is the slope of this equation? Round to two decimal places. c) Use the linear regression equation...
1. A differential cost is a variable cost True False. 2. If the number of units...
1. A differential cost is a variable cost True False. 2. If the number of units sold increase, the break-even point will decrease. True False. 3. All other things the same, a decrease in variable expenses per unit will reduce the break-even point. True False. 4. Inventories are usually the most liquid, but lowest-yielding, current asset of a firm. True False. 5. A sunk cost is a cost that has already been incurred but that can be avoided at least...
The table below gives the number of hours spent unsupervised each day as well as the...
The table below gives the number of hours spent unsupervised each day as well as the overall grade averages for seven randomly selected middle school students. Using this data, consider the equation of the regression line, yˆ=b0+b1xy, for predicting the overall grade average for a middle school student based on the number of hours spent unsupervised each day. Keep in mind, the correlation coefficient may or may not be statistically significant for the data given. Remember, in practice, it would...
1. an urn contains 6 marbles of which 2 are blue, 2 are yellow and 2...
1. an urn contains 6 marbles of which 2 are blue, 2 are yellow and 2 are red. Sarah, Sally, and Sandra take their turn drawing two marbles each, one at a time, and without replacement. a. if sarah is the first to draw two marbles, what is the probability she draws two blue marbles? b. if sarah is the last to draw two marbles, what is the probability she draws two blue marbles. c. if sandra is the last...
QUESTION 1 What does the following code segment output? int red, blue; red = 7; blue...
QUESTION 1 What does the following code segment output? int red, blue; red = 7; blue = red + 2 * 5 red++; blue = blue + red; cout << blue; 4 points    QUESTION 2 Is the following statement true or false? The Boolean expression in the following if statement will be true for all values of x in the range from 10 to 20 (including the endpoints) and false for all other values: int x; if (x >=...
1. Customers at the local Subway store order an ice tea with their meal 70% of...
1. Customers at the local Subway store order an ice tea with their meal 70% of the time. Use the Binomial distribution to find the answer to the following. Find the probability that among the next 8 customers, at least 3 will order ice tea with their meal:  (to three places after the decimal) Of the next 8 customers, how many do you expect to order ice tea with their meal?  (to one place after the decimal) 2. The average score of...
Refer to the following regression output: Predictor Coef SE Coef Constant    30.00 13.70 X1    -7.00 3.60...
Refer to the following regression output: Predictor Coef SE Coef Constant    30.00 13.70 X1    -7.00 3.60 X2 3.00 9.30 X3 -19.00 10.80 Source DF SS MS F   Regression 3.00 8,200.00   Error 25.00     Total 28.00 10,000.00 a. What is the regression equation? (Round the final answers to the nearest whole number. Negative answer should be indicated by a minus sign.) Y′ =  +   X1 +  X2 +  X3 b. If X1 = 4, X2 = 6, and X3 = 8, what is the value of...
A school newspaper reporter decides to randomly survey 17 students to see if they will attend...
A school newspaper reporter decides to randomly survey 17 students to see if they will attend Tet (Vietnamese New Year) festivities this year. Based on past years, she knows that 18% of students attend Tet festivities. We are interested in the number of students who will attend the festivities. Part a) In words, define the Random Variable X. A) the number of students in the school B) the types of festivities offered at the school     C) the number of students...
Need in C language also need full documentation/explanation of each line A student has established the...
Need in C language also need full documentation/explanation of each line A student has established the following monthly budget: Budget Categories Budgeted amount ----------------------------------------------------- Housing $ 580.00 Utilities $ 150.00 Household Expenses     $ 65.00 Transportation $ 50.00 Food $ 250.00 Medical $ 30.00 Insurance $ 100.00 Entertainment $ 150.00 Clothing $ 75.00 Miscellaneous $ 50.00 ---------------------------------------------------- Write a program that declares a MonthlyBudget structure designed with member variables to hold each of these expense categories. The program should define...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT