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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 21:00, mazolethrin9632
Which of these is most responsible for differences between the twentieth century to the twenty-first century?
Answers: 2
image
Computers and Technology, 23.06.2019 01:20, shiann2002
Me with this program in c++ ! computers represent color by combining sub-colors red, green, and blue (rgb). each sub-color's value can range from 0 to 255. thus (255, 0, 0) is bright red. (130, 0, 130) is a medium purple. (0, 0, 0) is black, (255, 255, 255) is white, and (40, 40, 40) is a dark gray. (130, 50, 130) is a faded purple, due to the (50, 50, 50) gray part. (in other word, equal amounts of red, green, blue yield gray).given values for red, green, and blue, remove the gray part. ex: if the input is 130 50 130, the output is: 80 0 80. thus, find the smallest value, and then subtract it from all three values, thus removing the gray.
Answers: 3
image
Computers and Technology, 23.06.2019 09:10, djs1671
(328 inc. 448 ind. 480 in25. john has a collection of toy cars. he has 2 red cars, 4 blue cars, 4 black cars, and 6 yellowcars. what is the ratio of red cars to yellow cars? a. 1: 2b. 1: 3c. 1: 626. the net of a right triangular prism is shown below.
Answers: 2
image
Computers and Technology, 23.06.2019 14:00, camiserjai1832
In which job role will you be creating e-papers, newsletters and preiodicals
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: