Question: 1. Your job is to create a program that will allow a user to enter a year. Your program will then give what animal is

 1. Your job is to create a program that will allow

1. Your job is to create a program that will allow a user to enter a year. Your program will then give what animal is associated with that year in Chinese culture. Create a new Java Class named AnimalOfTheYear within the Lab7 project. 2. You will want to use the algorithm (year-1972) % 12 in order to get a value, then you will want to use the value within a switch statement to output the proper animal for that year at 3. Your output should look similar to the following: This progran wi12 ank for a year and dtaplay vhat aninal it corresponds to 4. Here are some test cases for you: ooster 5. (Optional) This algorithm only works for years after and including 1972, modify it so that it can also accept answers from before 1972 Remember the following things: 1. If your switch statement, or something else we have covered in the labs, does not work, check some examples to see what may be causing it. 2. Good coding style is expected of you, don't forget to 3. You are required to use the switch statement for this 4. Do not hardcode the test cases, your instructor wll try comment. assignment, you will fail this lab if you do not use it. other years to test for functionality

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!