subject

The code below has five errors. The errors may be syntax errors or logic errors, and there may be more than one per line; examine the code carefully to find them. Indicate each of the errors you find by writing the line number and correction in the space provided below. Class Computer {
public:
void SetProcessor(string processor){

processor = m_processor;
}
void SetRam(int ram){
m_ram = ram;
}
public:
string m_processor;
int m_ram;
};
class Phone1 : public Computer{
public:
void MakeCall() {
cout << "You made a call!" << endl;
}
};
class Desktop : public Computer{
public:
void BurnDVD() {
cout << "You burned a DVD!" << endl;
}
};
int main () {
Desktop desk1;
desk1.SetProcessor("i7");
desk1.SetRam(64);
Phone phone1;
phone1.SetProcessor(Snapdragon);
phone1.SetRam(8);
desk1.BurnDVD();
phone1.MakeCall();
return 0;
}

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 00:40
Consider the following statements: struct nametype{string first; string last; }; struct coursetype{string name; int callnum; int credits; char grade; }; struct studenttype{nametype name; double gpa; coursetype course; }; studenttype student; studenttype classlist[100]; coursetype course; nametype name; mark the following statements as valid or invalid. if a statement is invalid, explain why.a.) student.course.callnum = "csc230"; b.) cin > > student.name; c.) classlist[0] = name; d.) classlist[1].gpa = 3.45; e.) name = classlist[15].name; f.) student.name = name; g.) cout < < classlist[10] < < endl; h.) for (int j = 0; j < 100; j++)classlist[j].name = name; i.) classlist.course.credits = 3; j.) course = studenttype.course;
Answers: 1
question
Computers and Technology, 23.06.2019 02:00
For a typical middle-income family, what is the estimated cost of raising a child to the age of 18? $145,500 $245,340 $304,340 $455,500
Answers: 1
question
Computers and Technology, 23.06.2019 13:00
Which one of the following voltages should never be measured directly with a vom? a. 1200 v b. 500 v c. 800 v d. 100v
Answers: 2
question
Computers and Technology, 24.06.2019 18:00
Explain the circumstances for which the interquartile range is the preferred measure of dispersion. what is an advantage that the standard deviation has over the interquartile range? choose the correct answer below. a. the interquartile range is preferred when the distribution is symmetric. an advantage of the standard deviation is that it increases as the dispersion of the data increases. b. the interquartile range is preferred when the data are not skewed or no have outliers. an advantage of the standard deviation is that it uses all the observations in its computation. c. the interquartile range is preferred when the distribution is symmetric. an advantage of the standard deviation is that it is resistant to extreme values. d. the interquartile range is preferred when the data are bell shaped. an advantage of the standard deviation is that it is resistant to extreme values. e. the interquartile range is preferred when the data are skewed or have outliers. an advantage of the standard deviation is that it uses all the observations in its computation. f. the interquartile range is preferred when the data are bell shaped. an advantage of the standard deviation is that it increases as the dispersion of the data increases.
Answers: 2
You know the right answer?
The code below has five errors. The errors may be syntax errors or logic errors, and there may be mo...
Questions
question
Mathematics, 04.11.2019 19:31
question
Social Studies, 04.11.2019 19:31
question
Mathematics, 04.11.2019 19:31
Questions on the website: 13722359