please help me using C++ to create the following hierarchy of classes;
(1). a Person class with fields for name (type String) and an email address (type String). it should contain two constructors: one without input , a second one with input name of type string and email of type string to appropriately set the name and email address' you also need to provide a setName, setEmail and showPerson method.
(2). a OfficePerson class that extends Person. it should inherit the fields from Person well as define one additional field phone of type int to hold a 4-digit phone extension number. Override inherited methods only when necessary.
(3). a Test class that tests the two Person and OfficePerson classes by initiating appropriate objects.
smata 0 Newbie Poster
Recommended Answers
Jump to Postcan you help?. i know some coding
Certainly I can help, as can several others here. However, writing the code for you would not be Help, it would be Cheating. No one here will help you do that.
We are willing to do quite a bit here, perhaps …
Jump to Postcan you help?. i know some coding
Show us what you know... We'll help you from there..
All 5 Replies
Schol-R-LEA 1,446 Commie Mutant Traitor Featured Poster
smata 0 Newbie Poster
Schol-R-LEA 1,446 Commie Mutant Traitor Featured Poster
rhn94 0 Newbie Poster
tkud 0 Posting Whiz in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.