Stringed Instruments, Inheritance Demo
Ukulele.h
1 #pragma once
2 #include "cmpslib.h"
3 #include "StringedInstrument.h"
4 
5 
6 
7 
8 
15 {
16 protected:
17 int size;
18 
19 public:
20 static const int soprano =0;
21 static const int concert =1;
22 static const int tenor =2;
23 static const int baritone =3;
24 
25 string ToXML();
26 
28 Ukulele(string brand="", string model="", double cost=0, double retail_price=0, int size = Ukulele::concert );
29 
30 };
31 
32 
33 
string ToXML()
return a string represention of the entire class serialized as XML
Definition: Ukulele.cpp:19
string brand
Brand Name of Product.
Definition: Instrument.h:12
Definition: StringedInstrument.h:9
int size
integer value that represents the size of the ukulele
Definition: Ukulele.h:17
Ukulele(string brand="", string model="", double cost=0, double retail_price=0, int size=Ukulele::concert)
Definition: Ukulele.cpp:8
double cost
Wholesale Price.
Definition: Instrument.h:14
string model
Model Name of Product.
Definition: Instrument.h:13
static const int soprano
a constant value for the size member
Definition: Ukulele.h:20
double retail_price
Retail Price.
Definition: Instrument.h:15
static const int baritone
a constant value for the size member
Definition: Ukulele.h:23
Definition: Ukulele.h:14
static const int concert
a constant value for the size member
Definition: Ukulele.h:21
static const int tenor
a constant value for the size member
Definition: Ukulele.h:22