How do I correctly implement this code segment without getting a logic error? [closed]

Shoe roshe = new Nike(“roshe”, 11, “black”, “fashion”, 129.0, false) String literals should be enclosed in double quotes. As for your change in size type, pass int array instead of int int s[] = {11,12,13}; Shoe roshe = new Nike(“roshe”, s, “black”, “fashion”, 129.0, false) or Shoe roshe = new Nike(“roshe”,new int[]{11, 12, 13} , … Read more

Questions regarding constructors

class Number : public string { public: Number() : string(“0”) { } Number(const string &str) : string(str) { } }; However, as long as you have the following 2 lines in the beginning, the name Number will be replaced by preprocessor. #ifndef Number #define Number You should use another macro name for the #include guard.

Trouble with Inheritance c# [closed]

Remove the getter and setter of your private campusName and rename your public campusName to CampusName. Add following code in your Campus class public override string ToString() { return CampusName() + “\n is located at ” + ShowAddress() + “\n it has ” + Departments(); } You should write a base School class public class … Read more