Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(Please don't copy other answers on Chegg) Can someone please hand-draw this Flowchart for my project? I already have it written down below but need

(Please don't copy other answers on Chegg)

Can someone please hand-draw this Flowchart for my project? I already have it written down below but need someone to help draw it for me since I'm new. I will give you a thumbs up for your help.

Flowchart:

[Start]

|

|

[Declare variables]

|

|

[Create Pet constructor]

|

|

[Create accessor methods]

|

|

[Create mutator methods]

|

|

[Create petCheckIn method]

|

|

[Check if Pet is already checked in]

|

|

[Yes] Return error message

|

[No]

|

[Set checkInDate]

|

[Return confirmation message]

|

[End]

Below I will post the instructions to my project and the Java Code I made and the Pseudocode.

(Feel free to also make corrections if you feel the Pseudocode is incorrect) I just need the flowchart and Pseudocode.

image text in transcribed

Instructions:

You work for Global Rain, a software engineering company that specializes in custom software design and development. As a junior software developer, you are part of a software development team that collaborates to create solutions for entrepreneurs, businesses, and government agencies around the world.

As part of a development team at Global Rain, you will be designing and developing custom software for a local pet boarding and grooming business, Pet Boarding and Grooming (Pet BAG). Pet BAG is seeking a way to modernize its operations by introducing custom software that will help replace inefficient paper-based processes. Your Global Rain team will collaborate to develop an app that will have the following initial functional areas: pet check in and pet check out.

As part of this team, you have been tasked with completing some preliminary work that consists of writing a Java class, writing pseudocode, and creating a flowchart. You will provide these deliverables to your supervisor.

Directions

Your supervisor has given you a specification document which details Pet BAGs software needs and includes a UML Class diagram. Using these documents, you will create both a Java class and a summary report. Your summary report will include pseudocode and a flowchart for one method (pet check in or pet check out), and an explanation of how your work meets object-oriented principles.

Pet.java Class File

Before you begin, it is important to understand what your client needs the software to do, and what work has already been done by your team. Review the Pet BAG Specification Document, located in the Supporting Materials section, which includes a UML Class diagram. Pay close attention to the class hierarchy, attributes, and behaviors.

To begin, open the Virtual Lab by clicking on the link in the Virtual Lab Access module. Then open your integrated development environment (IDE) and create the Pet class based on the specifications in the UML Class diagram. The Pet class must include the following:

All attributes with appropriate data structures. Note that the types are not specified in this UML class diagram. You will need to think about what the most appropriate data type is for each attribute.

At least one constructor method. You may use a default constructor. To score exemplary on this criterion, your constructor must initialize values for the petType, petName, petAge, and daysStay attributes.

Accessors and mutators for all attributes

Note: You are only being asked to create one class. Though the UML diagram shows the Pet class as part of a larger application, for this project, you are not required to connect it to other classes or to try and run it as a program. Instead, you are practicing the skill of creating a class from a UML Class diagram.

Global Rain Summary Report

When you are done implementing the Pet class, refer back to the Pet BAG Specification Document and select either the pet check in or check out method. These methods are detailed in the Functionality section of the specification document.

Open the summary report template, located in the What to Submit section. In the template, write pseudocode that lays out a plan for the method you chose. Ensure that you organize each step in a logical manner and that your method meets the specifications in the document for either the check in or check out process. Your pseudocode must not exceed one page.

Note: Remember, you will not be creating the actual code for the method, and you do not have to write pseudocode for both methods.

Based on the pseudocode you wrote, create a flowchart using a tool of your choice for the method you selected. Your flowchart will help your team communicate how you are planning to develop the software for your client. Your flowchart must be confined to one page. In your flowchart, be sure to do the following:

Include start and end points.

Include appropriate decision branching.

Align the flowchart to the check in or check out process.

Note: You may draw your flowchart by hand and take a clear picture of it, or you may use a flowcharting tool. Refer to the Supporting Materials section to help you insert your flowchart into your summary report.

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

I am attaching code for all files:

Pet.java Dog.java Cat.java Main.java

Pet.java:

import java.util.Scanner; import java.util.Dictionary; import java.util.HashMap; import java.util.Map;

public class Pet { private String petType; private String petName; private int petAge; private Map dogSpace; // contains the Pet and days it is staying private Map catSpace; // same but for cats private int daysStay; public double amountDue;

/** * Pet, base class for Dog and Cat * @param String name - Name of the Pet * @param int age - Age of the Pet * @param String type - Cat | Dog */ public Pet(String name, int age, String type) { this.petName = name; this.petAge = age; this.petType = type; this.dogSpace = new HashMap(); // use a hashmap to keep track of pets in the shelter this.catSpace = new HashMap(); // the Pet object is the key, and the days they are staying is the value. }

public void checkIn(Pet pet) { Scanner in = new Scanner(System.in); System.out.println("How many days will your " + this.petType + " be staying?"); int days = (int) in.nextInt(); this.daysStay = days;

switch(this.petType) { case "Dog": if(days > 1) { System.out.println("Do you require grooming services?"); String needsGrooming = in.next(); boolean grooming; if(needsGrooming.equals("yes") || needsGrooming.equals("y")) { System.out.println("We will groom your dog... "); grooming = true; } else { grooming = false; } this.checkInDog((Dog) pet, days, grooming); // handle the special dog cases } else { this.checkInDog((Dog) pet, days, false); } break; case "Cat": if(this.catSpace.size()

/** * Check out the desired Pet and calculate how much is owed for the boarding. * @param pet - The pet you wish the check-out. * @return amountDue - The amount of money owed for the boarding. */ public double checkOut(Pet pet) { double fee;

if(pet.getPetType() == "Dog") { double groomingfee = 0.0;

Dog animal = (Dog) pet; int days = this.dogSpace.remove(pet); double weight = animal.getDogWeight(); if(weight 20 && weight

public Pet getPet(Pet pet) { // Not sure why we need this. return pet; }

public Pet createPet(String name, int age, String type) { switch(type) { case "Dog": return new Dog(name, age); case "Cat": return new Pet(name, age, "Cat"); // I have implemented the dog class, not the cat. default: throw new Error("Only Dogs and Cats can stay at this facility."); } }

/** * Asks the user to fill in all of the attributes of a pet. Saves them directly to the object it was called on. * @param pet - The pet you wish to update information on. */ public void updatePet(Pet pet) { Scanner in = new Scanner(System.in); System.out.println("What is the pets new name?"); pet.setPetName(in.next()); System.out.println("What is the pets age?"); pet.setPetAge(in.nextInt()); System.out.println("What type of animal is your pet?"); pet.setPetType(in.next()); in.close(); }

public String getPetName() { return this.petName; }

public int getPetAge() { return this.petAge; }

public String getPetType() { return this.petType; }

public void setPetName(String name) { this.petName = name; }

public void setPetAge(int age) { this.petAge = age; }

public void setPetType(String type) { switch(type) { // while a switch is extra here, it will make it easier to add other pets. case "Dog": this.petType = type; break; case "Cat": this.petType = type; break; } } public void setDaysStay(int days) { this.daysStay = days; } }

Dog.java:

public class Dog extends Pet { public int dogSpaceNbr; private double dogWeight; private boolean grooming;

public Dog(String name, int age) { // automatically declares a pet of type Dog super(name, age, "Dog"); // super is used to call the parent classes constructor }

public double getDogWeight() { return this.dogWeight; }

public boolean getGrooming() { return this.grooming; }

public void setDogWeight(double weight) { this.dogWeight = (double) weight; // casting a double here might be redundant, but it helps us to be sure } // we don't get at type error

public void setGrooming(boolean value) { this.grooming = value; } }

Cat.java:

public class Cat extends Pet { private int catSpaceNbr; // The number space the cat is in. public Cat(String name, int age) { // automatically declares a pet of type Cat super(name, age, "Cat"); // Calls the constructor of the parent class } public int getCatSpace() { return this.catSpaceNbr; } public void setCatSpace(int number) { this.catSpaceNbr = number; } }

Main.java:

public class Main { public static void main(String args[]) { Pet pet = new Pet("Spot", 12, "Dog" ); System.out.println("Pet name is " + pet.getPetName());

Dog dog = new Dog("Pepper", 15); System.out.println("" + dog.getPetName() + " is " + dog.getPetAge() + " years old."); Cat cat = new Cat("Bailey", 5); System.out.println("" + cat.getPetName() + " is " + cat.getPetAge() + " years old."); pet.checkIn(dog); double price = pet.checkOut(dog); System.out.println("You owe " + price + "."); } }

image text in transcribed

Global Rain Summary Report: (It would help if you could also do the OOP Principles Explanation:)

image text in transcribed

Here is the Pseudocode: Pseudocode: 1. Declare variables for petType, petName, petAge, and daysStay. 2. Create a Pet constructor method that initializes values for petType, petName, petAge, and daysStay. 3. Create accessor methods for all variables. 4. Create mutator methods for all variables. 5. Create a petCheckln method that takes in a Pet object and a date as parameters. 6. Check if the Pet object is already checked in by looking at its checkinDate attribute. 7. If the Pet is already checked in, return an error message. 8. If the Pet is not checked in, set the checklnDate to the given date and return a confirmation message. To complete this project, you must submit the following: Pet.java Class File Create the Pet class in your integrated development environment (IDE). To submit this deliverable, save the Pet class file as Pet.java. Use the Downloading Files From Eclipse Tutorial if you need help with this task. Global Rain Summary Report You will use the Global Rain Summary Report Template Word Document to complete the report. Your report must contain your pseudocode, flowchart, and explanation of the objectoriented programming principles you applied. IT 145 Pet BAG Specification Document Overview Pet Boarding and Grooming (Pet BAG) is a company that provides boarding and grooming services for dogs and cats. They want to modernize their operations by introducing custom software that will help replace inefficient paper-based processes. UML Class Diagram Work on the Pet BAG application has already begun. Use this UML Class diagram, prepared by your supervisor, to understand the relationships between the Pet, Dog, and Cat classes. Functionality Pet BAG is seeking an application that has the following initial functionality: - Ability to check in pets - Ability to check out pets Each of these functional areas is described in more detail below. Pet Check In The method for the pet check in process should meet the following criteria: - Determine if the pet is a dog or a cat and check for boarding space. - There are 30 spaces for dogs and 12 for cats. Pet BAG will need to be able to adjust these counts as the shop grows. - If there is space for a new pet, collect the appropriate information. For returning pets, update the information as needed. - Gather information on the length of the stay. - Determine if the pet owner would like the pet to be groomed. Only dogs can be groomed and only if they stay two or more days. - Assign the pet to a space. Pet Check Out The method for the pet check out process should meet the following criteria: - Identify the pet and its boarding space. - Determine if the pet had a grooming fee. Only dogs can be groomed and only if they stay two or more days. - Use the following table to calculate the total fees. - Mark the boarding space as vacant. C:XWindows\System 32 \cmd.exe Microsoft Windows [Version 10.0.18363.1139] (c) 2019 Microsoft Corporation. All rights reserved. A: \CheggP\304>javac Main.java A: \CheggP\ \04> java Main Pet name is Spot Pepper is 15 years old. Bailey is 5 years old. How many days will your Dog be staying? 10 Do you require grooming services? Yes Pepper will miss you, but is in good hands. Fee Schedule: Boarding Fee: 240.0 Grooming Fee: 0.0 You owe 240.0. A:\ CheggP\ 304> Directions Place your pseudocode, flowchart, and explanation in the following sections. Before you submit your report, remove all bracketed text. Pseudocode When you are done implementing the Pet class, refer back to the Pet BAG Specification Document and select either the pet check in or check out method. These methods are detailed in the Functionality section of the specification document. Write pseudocode that lays out a plan for the method you chose, ensuring that you organize each step in a logical manner. Remember, you will not be creating the actual code for the method. You do not have to write pseudocode for both methods. Your pseudocode must not exceed one page. [Type or copy your pseudocode here.] Flowchart Based on the pseudocode you wrote, create a flowchart using a tool of your choice for the method you selected. In your flowchart, be sure to include start and end points and appropriate decision branching, and align the flowchart to the check in or check out process. Your flowchart must be confined to one page. [Insert your flowchart image here. Refer to the Project One Supporting Materials for tool options to create your flowchart and support for copying images into this template.] OOP Principles Explanation Briefly explain how you applied object-oriented programming principles and concepts (such as encapsulation, inheritance, and so on) in your software development work thus far. Your explanation should be one paragraph, or four to six sentences. [Type your explanation here.]

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing Fundamentals Design

Authors: Marion Donnie Dutton Don F. Seaman

14th Edition Globel Edition

1292107634, 978-1292107639

More Books

Students also viewed these Databases questions