Stringed Instruments, Inheritance Demo
Guitar.h
1 #pragma once
2 #include "cmpslib.h"
3 #include "StringedInstrument.h"
4 
5 
11 class Guitar : public StringedInstrument
12 {
13 public:
14 string ToXML();
15 
17 Guitar(string brand="", string model="", double cost=0, double retail_price=0,int string_type = StringedInstrument::steel,string standard_tuning="E,A,D,G,B,E");
18 
19 };
20 
21 
22 
string brand
Brand Name of Product.
Definition: Instrument.h:12
Definition: StringedInstrument.h:9
double cost
Wholesale Price.
Definition: Instrument.h:14
string model
Model Name of Product.
Definition: Instrument.h:13
double retail_price
Retail Price.
Definition: Instrument.h:15
Definition: Guitar.h:11
Guitar(string brand="", string model="", double cost=0, double retail_price=0, int string_type=StringedInstrument::steel, string standard_tuning="E,A,D,G,B,E")
Definition: Guitar.cpp:7
static const int steel
a constant value for the string_type member
Definition: StringedInstrument.h:19
string ToXML()
return a string represention of the entire class serialized as XML
Definition: Guitar.cpp:14
short int string_type
An integer value that represents the material type of the strings.
Definition: StringedInstrument.h:13
string standard_tuning
A string representation of the default note for each string.
Definition: StringedInstrument.h:12