Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Writing a C++ program

Posted on 2007-11-13
3
Medium Priority
?
631 Views
Last Modified: 2008-02-01
Write a class called Dog which keeps track of the dog's name, breed, age, and license fee. The license fee will be a set amount: $12.25, since you only need one copy of this in memory, make it static. Include a method which allows you to set the dog's name, breed and age. Include another method which displays the dog's name, breed, age and license fee. Write code to test your class.
0
Comment
Question by:tamiko10
3 Comments
 
LVL 30

Expert Comment

by:Axter
ID: 20277385
What is your question?

FYI:
It's against EE policy to do homework questions.

Try doing the work, and when you get stuck, post a specific question along with your code.
0
 
LVL 20

Accepted Solution

by:
ikework earned 1500 total points
ID: 20278075
start to create a class Dog with the attributes (member-variables): "name, breed, age, and license fee" ..
note: "The license fee will be a set amount: $12.25, since you only need one copy of this in memory, make it static"

if you are unsure about static members have a look at this:

http://www.cplusplus.com/doc/tutorial/classes2.html#static


ike
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
Suggested Courses

885 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question