[Solved] CSC 220 Lab 9-DogClass

$25

File Name: CSC_220_Lab_9-DogClass.zip
File Size: 207.24 KB

SKU: [Solved] CSC 220 Lab 9-DogClass Category: Tag:
5/5 - (1 vote)

Design and implement a class called Dog that contains Instance data That Represents the dogs name and Define the Dog constructor to accept and initialize instance data. Include getter and setter methods for the name and age. The getter names MUST be getName and getAge. The setter names must be setName and setAge. Include a method to compute and return the age of the dog in person years (seven times the dogs age). Include a toString method that returns a one-line description of the dog. Create a driver class called Kennel, whose main method instantiates and updates several Dog objects.

Die Class

  • Using the Die class defined in slides pdf, design and implement a class called PairOfDice, composed of two Die objects. Include methods to set and get the individual die values, a method to roll the dice, and a method that returns the current sum of the two die values. Create a driver class called RollingDice2 to instantiate and use a PairOfDice object. The driver should call each method of the PairOfDice object.

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] CSC 220 Lab 9-DogClass
$25