Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a C++ project, and all t Week 6-Abstract Parent Class. Now, let's realize the UML. class diagram (take the UML. class diagram to code

image text in transcribed
image text in transcribed
image text in transcribed
Create a C++ project, and all t 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 o 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. o The CaptainPirate class needs to inherit from the Pirate class o The speak() method should return a statement that you would expect from a CaptainPirate like this. return "Yaaarrr! It be a +pet+"InYaarrr Scallywags! Swab that poop deck!"; o The toString() method should return the Pirate toString) method plus a little more. For example: return Pirate: toString)+"pet: + pet; o 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). For example: string ZombiePirate: : speak (void) /I say sonething based on the hunger level switch (brainlunger) return "Yum. I just ate a brain

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advances In Databases And Information Systems 22nd European Conference Adbis 2018 Budapest Hungary September 2 5 2018 Proceedings Lncs 11019

Authors: Andras Benczur ,Bernhard Thalheim ,Tomas Horvath

1st Edition

3319983970, 978-3319983974

More Books

Students also viewed these Databases questions