Question

c++ (10) a.                    I have some data that represents information about TVs. The data for a...

c++

(10) a.                    I have some data that represents information about TVs. The data for a TVs is the screen size, a ‘dumb’ or ‘smart’ remote and TV price. Define a structure (TVSpecs) that will hold the data described above for one TV.

   (5) b. Now define a variable myTV that is of type TVSpecs

Homework Answers

Answer #1

ANSWER : HERE IS THE ANSWER FOR YOUR QUESTION:

i have combined both the program intro a single one .

i have provided comments so that you can refer easily for the questions part as a and b

----------------------------------------------------------------------------------------------------------------

               CODE:


#include <iostream>

using namespace std;

// 10.a
// defining the structure for the TVSpecs structure
struct TVSpecs
{
//screen_size as integer variable
int screen_size;
// string type variable as remote_type to hold data
string remote_type;
// float data type for storing the TV_price
float TV_price;
};

// 10.b
int main()
{
//ddefining the variable for the structure struct as myTV
TVSpecs myTV;
}

----------------------------------------------------------------------------------------------------------------

SNIPPET:

----------------------------------------------------------------------------------------------------------------

OUTPUT:

----------------------------------------------------------------------------------------------------------------

I hope this would help you out.

If you like my answer , please upvote

If you have any doubt, you can provide comment /feedback below the answer

Thanks

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
can anyone please paraphrase the below passege and also add some information about smartclass and how...
can anyone please paraphrase the below passege and also add some information about smartclass and how is the relationship between smart class and special need people? for example, how smartclass can help disabled people to study well and reach their goals? Smart Class is a solution designed to help teachers in meeting with new challenges and developing students abilities and performance. It helps the teachers to access multimedia content and information ,that can be used for teaching students more effectively....
I am researching about Competitive Advantage of Harley Davidson, and I wrote some information about it....
I am researching about Competitive Advantage of Harley Davidson, and I wrote some information about it. Please add more information in detail. "Competitive Advantage" Harley-Davidson's take on strategic planning for competitive advantage has helped the company increase its global market alongside it's already expanding U.S market increasing revenue and popularity overseas. Focusing on its brand loyalist's alongside it's one of a kind Harley-Davidson experience. Harley-Davidson has recently turned to what most would consider an unconventional marketing plan known as "...
Refer to file ‘Q1.csv’ on Canvas with data about some larvae. Consider a linear model that...
Refer to file ‘Q1.csv’ on Canvas with data about some larvae. Consider a linear model that predicts the metabolic rate using body size (measured in grams) as an explanatory variable. The variable names in the file are descriptive of what’s being measured. Consider also similar models but with a log base 10 transformation of only metabolic rate, only body size, or both variables. From all the options considered above, which model best satisfies the conditions that can be assessed with...
Refer to file ‘Q1.csv’ on Canvas with data about some larvae. Consider a linear model that...
Refer to file ‘Q1.csv’ on Canvas with data about some larvae. Consider a linear model that predicts the metabolic rate using body size (measured in grams) as an explanatory variable. The variable names in the file are descriptive of what’s being measured. Consider also similar models but with a log base 10 transformation of only metabolic rate, only body size, or both variables. From all the options considered above, which model best satisfies the conditions that can be assessed with...
Refer to file ‘Q1.csv’ on Canvas with data about some larvae. Consider a linear model that...
Refer to file ‘Q1.csv’ on Canvas with data about some larvae. Consider a linear model that predicts the metabolic rate using body size (measured in grams) as an explanatory variable. The variable names in the file are descriptive of what’s being measured. Consider also similar models but with a log base 10 transformation of only metabolic rate, only body size, or both variables. From all the options considered above, which model best satisfies the conditions that can be assessed with...
Question 1 Which statement is false about what Data Types defines Question 1 options: What values...
Question 1 Which statement is false about what Data Types defines Question 1 options: What values a variable cannot hold? How much memory will be reserved for the variable? What value a variable will hold? How the program will use the data type? Question 2 Using the structure below, which of the following statements about creating an array (size 20) of structures are not true? struct Employee{     string emp_id;     string emp_name;     string emp_sex; }; Question 2 options:...
Suppose you just obtained data from a survey in which you learned the following information about...
Suppose you just obtained data from a survey in which you learned the following information about 50 individuals: age, income, marital status, number of vehicles in the household. For each variable you will be asked to answer the following 2 questions: 1. State the type of data (quantitative and continuous, quantitative and discrete, or qualitative) 2. State the type of graphical summary you might be able to draw to provide a visual summary of the data. You do not need...
A ERD is to be designed for a Car Rental Co. (CRC). The information required includes...
A ERD is to be designed for a Car Rental Co. (CRC). The information required includes a description of cars, subcontractors (i.e. garages), company expenditures, company revenues and customers. Cars are to be described by such data as: make, model, year of production, engine size, fuel type, number of passengers, registration number, purchase price, purchase date, rent price and insurance details. It is the company policy not to keep any car for a period exceeding one year. All major repairs...
In the following C code, Which variable if NOT of primitive data type? A. a B....
In the following C code, Which variable if NOT of primitive data type? A. a B. b C. c D. d int a = 10; double b = 20.0; float c = false; char d[5] = "Hello"; // here we define a string In programming language C, the implementation of a string data type is limited dynamic length, which means the length of a string variable is fixed once it has been defined. A. True B. False In C# programming...
Currently stuck on this part of a project. I am struggling with creating the String for...
Currently stuck on this part of a project. I am struggling with creating the String for creating the dice values in the boxes for the "showDice" string. I have already completed the first part which was creating the class for the Die. This is Javascript. For this part, we will create the class that allows you to roll and score the dice used in a game of Yahtzee. This will be the longest part of the project, so I suggest...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT