Question
Asked by:
ynkeefn72
ynkeefn72
Rating : No Rating
Questions Asked: 20
Tutorials Posted: 0
 

$10.00 C++ Programming Exercise Help

Q:
This is another program that I am needing assistance in. It should also be a simple program, and is not due for a week or so, but I wanted to post this now.

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.
 


   
   
   
   
 
Available Tutorials to this Question
Posted by:
Albertom
Albertom
Rating (118): B
Questions Asked: 0
Tutorials Posted: 738, earned $353.88
 

$10.00 Simple Program,

  • This tutorial was purchased 1 time and hasn't been rated yet.
  • Posted on Feb 21, 2009 at 9:27:13PM
A:
Preview: ... ublic:<br>void dogin()<br>{<br>cout<<" Dog's name :";<br>cin>>Dogsname;<br>cout<<"\\n";<br>cout<<" Dog's breed :";<br>cin>>Dogsbreed;<br>cout<<"\\n";<br>cout<<" Dog's age :";<br>cin>>Dogsage;<br>cout<<"\\n";<br>}<br>void dogout()<br>{<br>cout<<" Dog's name ...

The full tutorial is about 98 words long .
Posted by:
rainman
rainman
Rating (40): A+
Questions Asked: 2
Tutorials Posted: 174, earned $906.64
 

$10.00 C++ Dog Class With Static Member License Fee, Code Compiles in VS C++ 2008, Is Commented

  • This tutorial hasn't been purchased yet.
  • Posted on Feb 22, 2009 at 5:21:19PM
A:
Preview: ... e <iomanip><br>#include <string><br><br>using namespace std;<br><br>class Dog<br>{<br> public:<br> void get(); //Get user input to set the dog's private variables<br> void display(); //Display the dog's information<br><br> private:<br> string name;<br> string breed;<br> int age;<br><br> //The license fee is static and doesn't change.<br> static const f ...

The full tutorial is about 415 words long plus attachments.

Attachments:
main.cpp (1K) (Preview)
Posted by:
nzpapillon
nzpapillon
Rating (256): A+
Questions Asked: 0
Tutorials Posted: 549, earned $4,988.47
 

$10.00 Fully-working tutorial example and sample output

  • This tutorial hasn't been purchased yet.
  • Posted on Feb 23, 2009 at 10:37:16PM
A:
Preview: ... <br>The dog class a ...

The full tutorial is about 14 words long plus attachments.

Attachments:
DogClassTest.cpp (1K) (Preview)
Dog Class Sample Output.txt (0K) (Preview)
Posted by:
vipinrl
vipinrl
Rating (24): C-
Questions Asked: 0
Tutorials Posted: 115, earned $191.95
 

$5.00 Compiled and Tested Program Source Code & Screenshot of Output window attached

  • This tutorial hasn't been purchased yet.
  • Posted on Feb. 24, 2009 at 12:41:18AM
A:
Preview: ... <br>{<br> cout<<"Name: ";<br> cin>>sName;<br> cout<<"Breed: ";<br> cin>>sBreed;<br> cout<<"Age: ";<br> cin>>iAge;<br>}<br><br>void Dog::DisplayDetails()<br>{<br> ...

The full tutorial is about 28 words long plus attachments.

Attachments:
Dog.cpp (0K)
dog.jpg (26K) (Preview)
Posted by:
modulo51
modulo51
Rating (110): A-
Questions Asked: 1
Tutorials Posted: 353, earned $2,117.64
 

$10.00 C++ Dog class & main in 1 source file, ScreenShot, UseNotes

  • This tutorial was purchased 2 times and rated A+ by students like you.
  • Posted on Feb. 26, 2009 at 12:09:39AM
A:
Preview: ... setBreed(string breedIn){<br> breed = breedIn;<br>}<br>void Dog::setAge(double ageIn){<br> age = ageIn;<br>}<br>void Dog::display(Dog d){<br> cout<<"\\nThis dog's information:\\n";<br> cout<<"Name: "<<d.name<<endl;<br> cout<<"Breed: "<<d.breed<<endl;<br> cout<<"Age: "<<d.age<<endl;<br> cout<<"License fee: $"<<d.licFee<<endl;<br>}<br>/// <br>int main() <br>{ ...

The full tutorial is about 397 words long plus attachments.

Attachments:
Dog.cpp (1K) (Preview)
DogScreenShot.JPG (46K) (Preview)
DogUseNotes.txt (2K) (Preview)
DogZipped.zip (164K)
   
Join Now or Log In
Get Tutoring
Get Paid
Academic Honesty