LastNameFirstNameWeek6Prog - Directions You must create two Java files One is called .java,and the other is called Ensure you include ALL

LastNameFirstNameWeek6Prog - Directions You must create two...

  • Homework Help
  • wardhatulaini
  • 4
  • 33% (3) 1 out of 3 people found this document helpful

This preview shows page 1 - 2 out of 4 pages.

/* Directions You must create two Java files. One is called,and the other is called Ensure you include ALL files required to make your program compile and run. I would like to see your .java files only. Class File 1. Create a new class called Horse that includes the functionality below 2. The new class has the attributes of: name Horse s name, type String age age of Horse in years, type integer height height of Horse in meters, type double color - type Horse s color, type String pureBlood - type boolean - true if Horse is pure blood, false if not 3. Be sure your classes have a good set of accessor and mutator methods. Every member variable must have at least one independent accessor and one independent mutator. 4. Example: public void setName(String name) mutator used to set name public void seAge(int age) mutator used to set the age // . Add other mutator methods here public String getName() accessor used to get name public int getAge() accessor used to get age // . Add other accessor methods here Ensure you use the this reference from within this class when referring to every instance variable or instance method of the current object.
Image of page 1
Image of page 2

You've reached the end of your free preview.

Want to read all 4 pages?

  • Spring '14
  • Method, Mutator method, driver program, pure blood

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask You can ask (will expire )
Answers in as fast as 15 minutes