[SOLVED] CSC 220 Lab 9-DogClass

30.00 $

Category:
Click Category Button to View Your Next Assignment | Homework

You will receive the following solution file(s) instantly after successful payment:

zip file icon lab9-6gmfha.zip (11.5 KB)
Assignment Instructions Updated Recently? Submit Below and we will provide new Solution!
Submit New Instructions
🔒 Securely Powered by:
Secure Checkout
Rate this product

Design  and  implement  a  class  called  Dog   that  contains  Instance  data  That  Represents  the  dog’s    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        dog’s    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.

                

  • lab9-6gmfha.zip