Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I am having trouble with my IT 145 final. below if the assignment description an

ID: 3723513 • Letter: I

Question

I am having trouble with my IT 145 final. below if the assignment description and my code. I am having trouble with the inputs and reading the txt file. Please do not write code from scratch for me. It must align with my pseudocode. Below if my code and pseudo code.. please help.

IT 145 Final Project Guidelines and Rubric Overview A successful career in software development depends on a thorough understanding of the fundamentals of object-oriented programming and best practices for software development. Your final project for this course will require you to apply the knowledge you have obtained prior to and during this course to the development of a simple, working program and accompanying process documentation. Professionals in software development document their process including requirements, design decisions, and defects for several different reasons as follows: To track what has been accomplished To track when items were completed in order to maintain aschedule To justify why a product works the way it does (verification andvalidation) To provide resources if a new team member is added so he or she can catchup To see where the most defects are being injected in order to preventthem To review what happened during the project in order to create new ways of improving theprocess For your development project, you will imagine you are in charge of managing a zoo’s computer infrastructure. There are many aspects of a zoo that need to be in place to keep it running. Two of those aspects are controlling data access and monitoring animal activities in exhibits. You will select which of these key components you wish to develop. Both options require at least two classes and for the design to be broken into multiple methods. Select one of the options provided in the prompt below and create your program and process documentation based on the specified requirements. The final project for this course is the creation of an authentication or monitoring system. The final project represents an authentic demonstration of competency because it involves application of real-world Java programming. The project is divided into one milestone and several final project journal assignments, which will be submitted at various points throughout the course to scaffold learning and ensure quality final submissions. Milestone One will be submitted in Module Five. The final project will be submitted in Module Seven. In this assignment, you will demonstrate your mastery of the following course outcomes: Implement appropriate variables, operators, methods, and classes asthey are used in object-oriented programming for developing successful programs Utilize appropriate syntax and conventions in terms of their best practice and use inprogramming Debug coding errors by testing existing code, identifying errors, and correcting errors for improved functionality Assemble basic, working programs that effectively integrate essential elements of object-oriented programming Prompt You have assumed the role of managing the technology infrastructure at a zoo. You will develop a working program (either an authentication system or a monitoring system) for the zoo designed to follow the specifications outlined in the overview. You will also provide detailed documentation describing your development process. Select from one of the following options as the basis of your program.

Option 2: Monitoring System As a zookeeper, it is important to know the activities of the animals in your care and to monitor their living habitats. Create a monitoring system that does all of the following: Asks a user if they want to monitor an animal, monitor a habitat, orexit Displays a list of animal/habitat options (based on the previous selection) as read from either the animals or habitats file o Asks the user to enter one of theoptions Displays the monitoring information by finding the appropriate section in thefile Separates sections by the category and selection (such as “Animal - Lion” or “Habitat -Penguin”) Uses a dialog box to alert the zookeeper if the monitor detects something out of the normal range (These will be denoted in the files by a new line starting with *****. Do not display the asterisks in thedialog.) Allows a user to return to the originaloptions You are allowed to add extra animals, habitats, or alerts, but you may not remove the existing ones. Specifically, the following critical elements must be addressed: I. Process Documentation: Create process documentation to accompany your program that addresses all of the followingelements: A. Problem Statement/Scenario: Identify the program you plan to develop and analyze the scenario to determine necessary consideration for building your program. B. Overall Process: Provide a short narrative that shows your progression from problem statement to breakdown to implementation strategies. In other words, describe the process you took to work from problem statement (your starting point) to the final product. Your process description should align to your end resulting program and include sufficient detail to show the step-by-step progress from your problem statement analysis. C. Pseudocode: Break down the problem statement into programming terms through creation of pseudocode. The pseudocode should demonstrate your breakdown of the program from the problem statement into programming terms. Explain whether the pseudocode differs from the submitted program and document any differences and the reason forchanges. D. Methods and Classes: Your pseudocode reflects distinct methods and classes that will be called within the final program. If the pseudocode differs from the submitted program, document the differences and reason forchanges. E. Error Documentation: Accurately document major errors that you encountered while developing yourprogram. F. Solution Documentation: Document how you solved the errors and what you learned fromthem. AI. Program: Your working program should include all of the specified requirements. The comments within your program will count toward the assessment of the documentation aspects of yoursubmission. A. Functionality 1. Input/Output: Your program reads input from the user and uses systemoutput. 2. Control Structures: Your program utilizes appropriate control structures for programlogic. 3. Libraries: Your program utilizes standard libraries to pull in predefinedfunctionality. 4. Classes Breakdown: Your program is broken down into at least two appropriateclasses. 5. Methods: Your program utilizes all included methods correctly within the classes. 6. Error Free: Your program has been debugged to minimize errors in the final product. (Your program will be run to determine functionality.) B. Best Practices: These best practices should be evident within your working program and processdocumentation. 1. Formatting Best Practices: Provide program code that is easy to read and follows formatting best practices as defined by the industry, such as with indentation. 2. Documentation Best Practices: Include comments where needed within the program in appropriate detail for communicating purpose, function, and necessary information to other information technology (IT) professionals. 3. Coding Best Practices: Ensure your program supports clean code through descriptive variablenames.

My code:


package zookeeper;

import java.io.IOException;  
import java.util.Scanner;

public class ZooKeeper {
public static void main(String[] args) {

Scanner scnr = new Scanner (System.in);

String monitorAnimal = ""; //monitor animal
String monitorHabitat = ""; //monitor habitat
String exit = "Exit" ;   

//Prompt user to enter an option
System.out.println("What would you like to do: Monitor animal('Type animal name')? Monitor Habitat('Type habitat name')?");
System.out.println("Type 'Exit' to exit program");

//Allow user input as long as "Exit" is not entered

//Animal details
  
while (monitorAnimal.equals("Lion")) { //I don't know how to set this up??? Or continue repeating for each animal selection or promted to exit
System.out.println("Animal: " + monitorAnimal); //Displays animal type entered by user
System.out.println("Name: Leo"); //Displays the animal's name  
System.out.println("Age: 5"); //Displays the animal's age
System.out.println("*****Health concerns: Cut on left front paw"); //Displays any health concerns
System.out.println("Feeding schedule: Twice daily"); //Displays animals' feeding schedule
System.out.println(); //Prints new line

if (monitorAnimal.equals("Tiger")) {   
System.out.println("Animal: " + monitorAnimal);
System.out.println("Name: Maj");
System.out.println("Age: 15");
System.out.println("Health concerns: None");
System.out.println("Feeding schedule: 3x daily");
System.out.println();

  
if (monitorAnimal.equals("Bear")) {
System.out.println("Animal: " + monitorAnimal);
System.out.println("Name: Baloo");
System.out.println("Age: 1");
System.out.println("Health concerns: None");
System.out.println("*****Feeding schedule: None on record"); //I'd like to have this error out and print output
  
System.out.println("Upate needed to feeding schedule");
System.out.println();


if (monitorAnimal.equals("Giraffe")) {
System.out.println("Animal: " + monitorAnimal);
System.out.println("Name: Spots");
System.out.println("Age: 12");
System.out.println("Health concerns: None");
System.out.println("Feeding schedule: Grazing");
System.out.println();

//Habitat details   
if (monitorHabitat.equals("Penguin")) //Displays name of animal habitat
System.out.println("Habitat: " + monitorHabitat); //Print habitat name
System.out.println("Temperature: Freezing"); //Displays habitat temperature
System.out.println("*****Food source: Fish in water running low"); //Displays habitat food source
System.out.println("Cleanliness: Passed"); //Diplays level of habitat cleanliness
System.out.println();
  

if (monitorHabitat.equals("Bird"))
System.out.println("Habitat: " + monitorHabitat);
System.out.println("Temperature: Moderate");
System.out.println("Food source: Natural from environment");
System.out.println("Cleanliness: Passed");
System.out.println();
  
if (monitorHabitat.equals("Aquarium"))
System.out.println("Habitat: " + monitorHabitat);
System.out.println("Temperature: Varies with output temperature");
System.out.println("Food source: Added daily");
System.out.println("*****Cleanliness: Needs cleaning from algae");
System.out.println();

//Prompt user to describe details about the habitat

if foodSource!= normalRange //Do I nest these within each if statement for each habitat? I don't know how to do that.
System.out.println("Food source needs attention"); //Also, I didn't initalize these. The ***** asteriks indicate a problem. What would I initalize them too?
System.out.println(); //Maybe declare String foodSource = ''; and then if foodSource.contains(*)...it throws an error message?

if healthConcerns != unsafeConditions
System.out.println("Safety concern found, needs immediate attention!");
System.out.println();

if habitatCare != acceptableRange
System.out.println("Habitat needs cleaning");
System.out.println();

if tempRange != normalTemp
System.out.println("Habitat temperature is stable");
System.out.println();
  
}
else { exit
}

My pseudo Code:

Pseudocode:

method main () {

INITIALIZE options //Prompt user to enter an option

To monitor an animal //User wants to monitor animal

To monitor a habitat //User wants to monitor habitat

Exit

IF zookeeper = monitorAnimal

Print "Which animal would you like to monitor?"

IF zookeeper = monitorHabitat

Print “Which habitat would you like to monitor?"

ELSE zookeeper = exit

ENDIF

WHILE zookeeper = monitorAnimal

ASK which animal

                               DETAILS on lions

                               DETAILS on tigers

                               DETAILS on bears

                               DETAILS on giraffes

// as soon as the zookeeper picks an animal the following appears

ENDWHILE

REPEAT // each animal chosen

                     PRINT “Animal: ”

               PRINT “Name: ”

               PRINT “Age: ”

                              PRINT ***** “Health concerns: ”

               PRINT “Feeding schedule: ”

UNTIL condition

WHILE zookeeper = monitorHabitat

ASK which habitat

// as soon as the zookeeper picks a habitat the following appears

ENDWHILE

REPEAT // each habitat chosen

UNTIL condition

Prompt user: “Please describe details about the habitat:” //Prompt user to enter an option

foodSource // User indicates details about food source

healthConcerns // User indicates details about health concerns

habitatCare //User indicates status of the habitat

tempRange //User indicates temperature status of the habitat

IF foodSource != normalRange

***** Print “Food source needs attention” // with new line

IF healthConcerns != unsafeConditions

***** Print “Safety concern found, needs immediate attention” // with new line

IF habitatCare != acceptableRange

***** Print “Habitat needs cleaning” // with new line

IF tempRange != normalTemp

***** Print “Habitat temperature is stable” // with new line

ELSE

ENDIF

RETURN

}

Explanation / Answer

import java.io.IOException;

import java.util.Scanner;

public class ZooKeeper {

public static void main(String[] args) {

int zookeeper;

while(true){

System.out.println("Choose your option:");

System.out.println("1. animal 2. habitat 3.exit");

Scanner scnr = new Scanner (System.in);

zookeeper = scnr.nextInt();

if(zookeeper==1){

System.out.println("Which animal would you like to monitor?: ");

System.out.println("1. Lions 2. Tigers 3. Bears 4. Giraffes");

int animalOption = scnr.nextInt();

if(animalOption==1){

System.out.println("Animal: Lion");

System.out.println("Name: Leo");

System.out.println("Age: 80");

System.out.println("**** Health concerns: Good");

System.out.println("Feeding schedule: 10:00PM");

}

else if(animalOption==2){

System.out.println("Animal: Tiger");

System.out.println("Name: Tigre");

System.out.println("Age: 50");

System.out.println("**** Health concerns: Average");

System.out.println("Feeding schedule: 08:00PM");

}

//write for other animals if you want

System.out.println();

}

else if(zookeeper==2){

System.out.println("Which habitat would you like to monitor?: ");

System.out.println("1. Penguin 2. Bird House 3. Aquarium");

int habitantOption = scnr.nextInt();

int habitatCare, healthConcerns, foodSource;

double tempRange;

//write like this if you need any conditions

System.out.println("1. Good 2. Bad");

System.out.println("Habitat: ");

System.out.println("Temperature: ");

tempRange = scnr.nextDouble();

if(tempRange>40)

System.out.println("Habitat temperature is unstable");

System.out.println("1. normal Range 2. out of range");

System.out.println("***** Food Source: ");

foodSource = scnr.nextInt();

if(foodSource==2)

System.out.println("Food source needs attention");

System.out.println("Cleanliness option display");

System.out.println("Cleanliness: ");

healthConcerns = scnr.nextInt();

System.out.println();

}

else{

System.exit(1);

}

}

}

}