Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Writing a C++ program

Posted on 2007-11-13
3
Medium Priority
?
627 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
  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 …
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…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

715 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