I cannot figure this out. There are 3 classes: Dog, Corgi, Driver. Here is the code i have so far for each class thank you so much! Dog class:...
View the step-by-step solution to:

Question

I cannot figure this out. There are 3 classes: Dog, Corgi, Driver. Here is the code i have so far for each class

thank you so much!!!


Dog class:


1. declare these class variables:


type: string

breed: string

name: string

topTrick: string

--------------------------------


setTopTrick(trick:string)

toString()


2. a constructor that incorporates the type, breed, and name variables (do not include topTrick). 

Note: The type refers to what the breed typically does; for example, a corgi would be a "cattle herding dog." A

Shiba Inu would be a "hunting dog."

3. setTopTrick() mutator method.


Top Answer

Sign up to view the full answer

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

-

Educational Resources
  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

    Browse Documents
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question