This program will be a Doggy Day Care. The menu should be Check in Dog Check Out Dog Exit
This program will be a Doggy Day Care. The menu should be
Check in Dog
Check Out Dog
Exit
If the user selects option 1 (Check in Dog), the program will take in all of the information for the dog and create a dog object (which will be stored in the array). All relevant input validation should be done for the information entered. Once the dog object is created, the program should tell the user how much it will be for the dog for the day. The Doggy Daycare can only contain up to 30 dogs. Before a new dog object is created, the program should check that the number of current dog objects is less than 30 (Hint: using the static field). If there are already 30 dogs, then if the user selects option 1, it should say “Sorry, the Doggy Day Care is at capacity”.
If the user selects option 2, it will ask for the owner’s name. It will search the array for that name and return the names of the dogs that the owner has checked in. This will check out those dogs (i.e. remove them from the array). Figure out how to deal with the holes this will create in the array.
When the user selects option 3, the program should write all the information for any dogs left in the array to a file named “YesterdaysLatePickups.txt”. Bonus if you can replace Yesterday with the actual date.
Image of my code is in attachment. Output of mine does option 1 only, i can keep on entering dog objects untill count 50 is reached, or if i choose 2 or 3 for which i need help a
thank you
![Scanner keyboard = new Scanner(System.in);
GuzicDogl] dog = new GuzicDog[30];
while (true) {
System.out.print("Enter one of the choices from the menu: 1 to check in dog, 2 to check
out, and 3 to exit. ");
choice = keyboard.nextInt();
if (choice == 1) {
System.out.printin("enter dog and owner info below");
info = keyboard.nextLine();
System.out.print("Enter owner name: ");
ownerName = keyboard.nextLine():
System.out.print("Enter dog name: ");
dogName = keyboard.nextLine();
System.out.print("Enter dog breed: ");
breed = keyboard.nextLine();
System.out.print("Enter dog color: ");
color = keyboard.nextLine();
System.out.print("Enter dog weight. ");
dogSize = keyboard.nextDouble();
System.out.print("Enter dog age: ");
dogAge = keyboard.nextInt();
System.out.printin("Did guest bring their own food? Enter Y or N: ");](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F1fd33cd0-9df6-4ed8-94c9-f0304ecd4d00%2Fce6b2170-dab5-41de-8a4a-4727554282de%2Fjcn0xaq_processed.png&w=3840&q=75)
![answer = keyboard.next().charAt(0);
%3D
"Y')
if (answer
{
food = true;
}
else if (answer == 'N')
{
food = false;
}
if(count<30){
dog[count] = new GuzicDog (dogSize, dogAge, dogName, ownerName, breed,
color, food, choice);
System.out.printin();
System.out.println("Owner of this dog is: "+ dog[count] getOwnerName();
System.out.println("Dog name is: "+ dog[count].getDogName());
System.out.printin("This dog is: "+ dog[count].getWeight() +
0 +""+
+ "size "
+ dog[count].getStage() + ""+ dog[count).getColor() +
dog[count].getBreed());
dog[count).setRate());
System.out.printin("Daily price for this dog day care is " +
System.out.printin():
count++;
}
else{
System.out.printin("Sorry, the Doggy Day Care is at capacity");
}
} / if end
else if(choice ==2)
{
Il code for input 2](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F1fd33cd0-9df6-4ed8-94c9-f0304ecd4d00%2Fce6b2170-dab5-41de-8a4a-4727554282de%2F57uaxt_processed.png&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
this answer hasnt cover all the questiion. Would you cover the all part of the question?
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
![Concepts of Database Management](https://www.bartleby.com/isbn_cover_images/9781337093422/9781337093422_smallCoverImage.gif)
![Prelude to Programming](https://www.bartleby.com/isbn_cover_images/9780133750423/9780133750423_smallCoverImage.jpg)
![Sc Business Data Communications and Networking, T…](https://www.bartleby.com/isbn_cover_images/9781119368830/9781119368830_smallCoverImage.gif)