Question
websitejdoodle online complier C++ needed for this. Copy/paste in the following code and compile it to verify that the IDE is working. // AssignmentA09.cpp :
websitejdoodle online complier C++ needed for this.
Copy/paste in the following code and compile it to verify that the IDE is working.
// AssignmentA09.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include
#include
using namespace std;
class Dog {
public:
string name;
public:
// constructor
Dog (string name) {
this->name = name;
cout
}
};
class Cat {
public:
string name;
public:
// constructor
Cat (string name) {
this->name = name;
cout
}
};
int main () {
string name = "Assignment 09";
cout
Dog fido ("Fido");
Cat spot ("Spot");
// These 2 lines of code break the object-oriented paradigm in a major way
cout
cout
cout
system ("pause");
return 0;
}
The output will look like this:
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started