Question: Write this code in java. Include a header comment as shown below. Use meaningful variables names and inline comments, as well as good use of
Write this code in java.
Include a header comment as shown below. Use meaningful variables names and inline comments, as well as good use of white space in your code.
/**
* Program Name
*Purpose: few sentences describing the program
* Pseudocode : Write the steps of the program.
*
*/
Program: Please the read the complete prompt before going into coding.
For this lab; you must write a program for a pet store.There will be two parts to complete.
Part 1: Have the program ask the user to enter the number of customers. The based on that value. The User will Be asked to enter each customers name, pet's name and type (such as a dog,cat,fish, etc.). All the information entered by the user must be stored, as this will be used in Part 2 of the program. *Hint: USE ARRAYS*
Part 2: This part, display a menu for user with 4 different options:
1. Search For Customer: This will ask user to enter a customers name.Search through the array, and if found , display that customers name, their pets name, and their pets type. If the customer does not exist, print "Unable to find Customer with that name." If there happen to be multiple customers with the same name, you only need to print the first one.
2. Search For Pet: This is similar to Option 1, however, it will search based on Pet Name, rather than Customer Name.
3. Pet Type Counter: Ask the user to enter a 'Pet Type' (such as dog,cat, etc.). The program will then search through the pet type array, and keep track of how many pet there are with the inputted 'type'. After searching through the entire array, display the total number of pets there are of the specified 'type'.
4. Quit: Allow the program to exit
Allow the user to keep choosing options from the menu until they choose quit.
Extra useful help: Add a 5th option in Part 2 called "New Customer". This will allow the user to add add a customer to the data, along with their Pets Name and type. The rest of Part 2 *The menu choices* should work with the added customers data as well.
Sample Run:
How many customers will be entered? 5
Enter Name 1: Tim
Enter Bob Pet: Chad
What kind of pet is Chad? Dog
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
