I need help with a java program
A.1. Create a new class called Hamster that includes the functionality below2. The new class has the attributes of:name – hamster’s name, type Stringage – age of hamster in months, type integerweight – weight of hamster in pounds, type doublecolor - type hamster’s color, type Stringvaccinated - type boolean - true if hamster was vaccinated, false if not3. 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 herepublic String getName() accessor used to get name public int getAge() accessor used to get age//.... Add other accessor methods hereEnsure you use the “this” reference from within this class when referring to every instance variable or instance method of the current object.
B.Write a driver program that reads in 3 pets of type Hamster and prints out the name, age and weight of all not vaccinated Hamster objects that are 4 or more months old. The following information should be read per Hamster in:nameage weight color vaccinated
Conditional statements should be used to decide which Hamster’s information should be printed.Use accessor methods to check the age and vaccination status on each Hamster.
The following is a sample of how the output session of the code should look like.Enter the name of Hamster1: chipEnter the age of Hamster1 in months: 1Enter the weight (in pounds) of Hamster1: 2 Enter the color of Hamster1: greyIs Hamster1 vaccinated? true or false?: true Enter the name of Hamster2: munkEnter the age of Hamster2 in months: 4Enter the weight (in pounds) of Hamster2: 1.5 Enter the color of Hamster2: whiteIs Hamster2 vaccinated? true or false?: true Enter the name of Hamster3: bluetoothEnter the age of Hamster3 in months: 5Enter the weight (in pounds) of Hamster3: 2.5 Enter the color of Hamster3: redIs Hamster3 vaccinated? true or false?: falseThe un-vaccinated hamsters over 4 months old are: Name: bluetoothAge: 5Weight: 2.5
I tried to compile and is giving me quite a few errors
How do I pick you as the expert I want?