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. Assume that include , are loaded as well as using namespace std.
You must find and correct all five of the errors.
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: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 13:00
Write a program which asks you to enter a name in the form of first middle initial last. so you might enter for example samuel p. clemens. use getline to read in the string because it contains spaces. also, apparently the shift key on your keyboard doesn’t work, because you enter it all lower case. pass the string to a function which uses .find to locate the letters which need to be upper case and use toupper to convert those characters to uppercase. the revised string should then be returned to main in the form last, first mi where it will be displayed.
Answers: 1
question
Computers and Technology, 23.06.2019 03:30
Hashtags serve to identify the topic of a given tweet true false
Answers: 2
question
Computers and Technology, 23.06.2019 07:30
What are ways to switch windows in excel? check all that apply. on the status bar, click the windows button, and then click the file name. on the task bar, click to display the excel jump list, and then click the file name. on the view tab, in the window group, click switch windows, and then click the file name. on the review tab, in the viewing group, click files, and then click the file name.
Answers: 1
question
Computers and Technology, 24.06.2019 15:30
During the software planning process, rick, a project manager, finds that his team has made an incorrect estimation of funds. what kind of risk has rick identified? rick has identified a risk.
Answers: 1
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, 19.12.2020 09:30
question
Social Studies, 19.12.2020 09:30
question
Chemistry, 19.12.2020 09:30
question
Mathematics, 19.12.2020 09:30
question
Mathematics, 19.12.2020 09:30
Questions on the website: 13722361