Question

In: Computer Science

1- The best choice for a data type used to store the grade to be recorded...

1- The best choice for a data type used to store the grade to be recorded at the end of the term for this course would be a(n) ____________. Valid values would be A, B, C, D, or F, no A- or B+ would be permitted, instead a single value will be stored.
2-  
The best choice for a data type used to store the name of the city where you currently live would be in a(n) [a].
3-The best choice for a data type used to store the cost of a pair of shoes would be in a(n) ____________. Hint: For your answer enter the default data type.
4-________ would be stored in x after the following statement (x++), assuming there was a compile time initialization of x defined as int x = 15;
5-If you had three integers defined, x, y and answer, an assignment statement to add the two value together would look like: ____________.
6- The best choice for a data type used to store a counter for the number of courses that you are currently enrolled is a(n) ____________.

Solutions

Expert Solution

Assuming the program language considered here is C++ or Java

Answers for all the questions are same in C++ and Java except for Question # 2

================================================================================

1. char (char always store a single letter or character)

============================================

In C++
2. string or char[] ( we can either use string or char array)

In Java

Its String

============================================
3. float (cost can be integer or float hence using float)

============================================
4. x will be 16 (after x++ value will be incremented by 1)

============================================
5. int sum = x+y; ( here we create a varaible of type int and store the sum of x an y to it)

============================================
6. int (we count things in integer, so the data type should be an int type)

============================================

thank You !


Related Solutions

What data type should be used to store a count of items in a shopping cart?...
What data type should be used to store a count of items in a shopping cart? Select one: a. int b. String c. double d. char e. boolean What data type should be used to store the dollar amount in a shopping cart? Select one: a. boolean b. char c. String d. int e. double
Which one is the best? Type I error of Type II error? Support your choice as...
Which one is the best? Type I error of Type II error? Support your choice as an industrial engineer
1. Choose the best match. Each of the answer can only be used once! This type...
1. Choose the best match. Each of the answer can only be used once! This type of bonds occurs both between fully charged group and between the partially charged groups on polar molecule. Hydrogen bonds This type of bonds forms when two atoms come very close together to share one or more of their electrons. Covalent bonds This type of bonds form when a hydrogen atom is â sandwichedâ between two electron-attracting atoms (usually oxygen or nitrogen). Hydrophobic forces This...
An SRS produced the following data. Is browser choice and grade level independent? The responses were...
An SRS produced the following data. Is browser choice and grade level independent? The responses were categorized below. Test at the .05 significance level. (α = .05) Safari Firefox Chrome Freshmen 20 25 40 Sophomore 40 30 30 Junior 50 25 50 Senior 90 20 75 What is your conclusion in plain English? a) There is not enough evidence to suggest that browser choice and grade level are dependent. b) Evidence suggests that browser choice and grade level are independent....
(CO 1) What type of data collection might be best to estimate the impact of exercise...
(CO 1) What type of data collection might be best to estimate the impact of exercise on longevity? Observational Survey Experiment Simulation Flag this Question Question 72 pts (CO 1) What type of data collection might be best to study how voters might decide an upcoming ballot issue? Observational Experiment Survey Simulation Flag this Question Question 82 pts (CO 1) You need to study the satisfaction of customers of a specific restaurant. You ask every 10th customer as they leave...
Question 1) Identify the type of data that would be used to describe a response. Time...
Question 1) Identify the type of data that would be used to describe a response. Time in Line to Buy Groceries A. Qualitative (Categorical) B. Quantitative - Continuous C. Quantitative - Discrete Question 2) Identify the type of data that would be used to describe a response. Most Watched Television Show A. Quantitative - Discrete B. Quantitative - Continuous C. Qualitative (Categorical) Question 3. lege administrator wants to survey 250 students that attend her college to see if students are...
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 2....
1.   Describe what type of data analysis would use linear correlation coefficients and line of best...
1.   Describe what type of data analysis would use linear correlation coefficients and line of best fits. Describe the benefits of comparing to a line of best fit. (10 points) 2. Raw data is found in the excel file titled “STA322 Week 3 Data – Tab Line of Best Fit.” Calculate the linear correlation coefficient of that data and describe what that information provides. Find the slope and y intercept and list the line of best fit. Take Microsoft Excel...
6. Which type of instrument would best be used to look at a grain of wheat...
6. Which type of instrument would best be used to look at a grain of wheat pollen. a) optical microscope b) radio telescope c) transmission electron microscope d) scanning electron microscope e) variable electron microscope 14) Rutherford’s alpha particle -scattering experiment showed that most alpha particles directed toward a thin metallic foil passed through with only slight deviations. From this evidence we can conclude that..... 18. Two stars star A and star B are the same size. The temperature of...
explain the type of absorbent materials in term of its function ,where best to be used,...
explain the type of absorbent materials in term of its function ,where best to be used, advantages, disadvantage ? for the materials below 1-Hair felt 2-Acoustic 3-Acoustical tiles 4-Straw board 5-Pulp boards 6-Compressed fiber board 7-Compressed wood particle board 8-Perforated plywood 9-Wood wool board 10-Quilts & mats
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT