subject

Create a c++ project, and call it week 6—abstract parent class. now, let's realize the uml class diagram (take the uml class diagram to code). create a pirate class using a separate header file and implementation file. review your uml class diagram for the attributes and behaviors. the speak() method should be abstract because we do not know how a pirate speaks until we know what kind of pirate the object is. to make the method abstract, set the virtual method to 0 like this. virtual string speak() = 0; // pure virtual method -- abstract method create a captainpirate class using a separate header file and implementation file. the captainpirate class needs to inherit from the pirate class the speak() method should return a statement that you would expect from a captainpirate like this. return "yaaarrr! it be a " + pet + "! \nyaarrr scallywags! swab that poop deck! "; the tostring() method should return the pirate tostring() method plus a little more. for example: return pirate: : tostring() + ", pet: " + pet; create a zombiepirate class using a separate header and implementation file. the zombiepirate class needs to inherit from the pirate class. the speak() method should return a statement based on how hungry the zombiepirate has become (reference the brainhunger).

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 15:30
To increase sales, robert sends out a newsletter to his customers each month, letting them know about new products and ways in which to use them. in order to protect his customers' privacy, he uses this field when addressing his e-mail. attach bcc forward to
Answers: 2
question
Computers and Technology, 23.06.2019 09:00
Which company provides a crowdsourcing platform for corporate research and development? a: mtruk b: wiki answers c: mediawiki d: innocentive
Answers: 2
question
Computers and Technology, 23.06.2019 18:00
Apunishment or the threat of punishment used to enforce conformity. select the best answer from the choices provided t f
Answers: 1
question
Computers and Technology, 23.06.2019 21:00
Will this setup result in what kathy wants to print?
Answers: 2
You know the right answer?
Create a c++ project, and call it week 6—abstract parent class. now, let's realize the uml class dia...
Questions
question
Mathematics, 18.04.2021 20:10
question
History, 18.04.2021 20:20