Identify the compiler errors and state what is wrong with the code.
```
#include
using namespace std;
class Ball
{
private:
string shade;
Ball(){ shade = green;}
WhatColor{}{cout << shade;} ]
}
int main();
{
Ball MyBall;
MyBall.WhatColor();
}
```
```
#include
using namespace std;
class Ball
{
private:
string shade;
Ball(){ shade = green;}
WhatColor{}{cout << shade;} << big problem with {} instead of ()
<< needs a return type too
}
int main(); << nope, can’t have the ; here
{
Ball MyBall; << because all private, couldn’t make an object
MyBall.WhatColor();
}
```
You might also like to view...
What type of technology allows users to work with files whether they are connected to network or not by copying files locally to mobile computers?
A. DirectAccess B. DSL C. VPN D. data synchronization
Applying the design principle of __________ serves to add visual interest and draw attention.
a. linear b. proximity c. contrast d. alignment
The ________ VoiceXML tag provides users with options and transfers control to other dialogs based on their selections.
(a)
The instructions that are used to tell the computer what to do to accomplish tasks are known as hardware.
Answer the following statement true (T) or false (F)