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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 04:40, debo4965
Amain idea is supported, explained, or expanded on with a numbers b. a concluding statement c. details d. a topic sentence. im e paragraphs reset nex next
Answers: 2
image
Computers and Technology, 23.06.2019 07:00, Dvrsug8598
You need a quick answer from a coworker. the most effective way to reach your coworker is through a. cloud server b. instant message c. teleconference d. telepresence
Answers: 1
image
Computers and Technology, 23.06.2019 18:40, cyn95xx
Johnson enterprises uses a computer to handle its sales invoices. lately, business has been so good that it takes an extra 3 hours per night, plus every third saturday, to keep up with the volume of sales invoices. management is considering updating its computer with a faster model that would eliminate all of the overtime processing.
Answers: 2
image
Computers and Technology, 24.06.2019 02:30, journeyhile5
How to apply the fly in effect to objects on a slide
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 in other subjects:

Konu
History, 11.07.2019 13:00