SlideShare a Scribd company logo
Monitoring System As a zookeeper, is important to it 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, or exit Displays a list
of animal options (based on the previous selection) as read from either the animals or habitats
file o Asks the user to enter one of the options Displays the monitoring information by finding
the appropriate section in the file Separates sections by the category and selection (such as
"Animal Lion" or "Habitat-Penguin Uses a dialog box to alert the zookeeper ifthe 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 the dialog.) Allows a user to return to the original
options Details on lions Details on penguin habitat Details on bird house Details on tigers Details
on aquarium Details on bears Details on giraffes Habitat Penguin Animal Lion Temperature:
Freezing Food source Fish in water running low Name: Leo Cleanliness Passed Age: 5 Health
concerns Cut on left front paw Habitat Bird Feeding schedule: Twice daily Temperature:
Moderate Food source: Natural from environment Animal Tiger Cleanliness Passed Name: Ma
Age: 15 Health concerns None Habitat Aquarium Temperature: Varies with output temperature
Feeding schedule 3x daily Food source: Added daily Cleanliness Needs cleaning from algae
Animal Bear Name: Baloo Age: 1 Health concerns None Feeding schedule: None on record
Animal Giraffe Name: Spots Age 12 Health concerns: None Feeding schedule Grazing
Below was the inital answer, can someone assist in transcribing thsi into "code"?
1. FileReader with BufferedReader and FileWriter with PrintWriter can be used for file I/O , line
wise . Each line with several Strings also called as token can be separated using split() on blank
space while retrieval .
2. End of file is denoted by -1 . The file can be iterated till the desired token is obtained , using a
while loop . eg. b can be a boolean variable intialized to true ,eg. while(b) . once the token is
obtained the b can be set to false .
3. To gather Information and display to the user , the token for choice can be searched and
corresponding data can be appended to StringBuilder token wise , till token for next category
starts or end of file and displayed using toString() method .eg. ***** is also a token or word
string which can be gathered into an String array , by split() method on each line extracted using
readLine() . Token comparison is done with isEquals("")
4. For User Menu Options , Scanner can be used for user input along with getString etc. and
switch case construct can be used for processing of user choice from menu . System.out.print()
for display to user messages .
5. To allow user to the previous option another super while loop can be used within which the
other looops done so that user can be presented the original options again . 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, or exit Displays a list of anima options (based
on the previous selection) as read from either the animals or habitats file o Asks the user to enter
one of the options Displays the monitoring information by finding the appropriate section in the
file 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 ofthe
normal range (These will be denoted in the files by a new line starting with Do not display the
asterisks in the dialog Allows a user to return to the original options Details on penguin habitat
Details on lions Details on bird house Details on tigers Details on bears Details on aquarium
Details on giraffes Habitat Penguin Animal Lion Temperature: Freezing Food source: Fish in
water running low Name Leo Cleanliness: Passed Age: 5 """""Health concerns: cut on left
front paw Habitat Bird Feeding schedule: Twice daily Temperature: Moderate Food source:
Natural from environment Animal Tige Cleanliness: Passed Name: Maj Age: 15 Health concerns
None Habitat Aquarium Temperature: Varies with output temperature Feeding schedule: 3x
daily Food source: Added daily Cleanliness Needs cleaning from algae Animal Bear Name:
Baloo Age: 1 Health concerns None Feeding schedule None on record Animal Giraffe Name:
Spots Age: 12 Health concerns: None Feeding schedule Grazing
Solution
Psudocode for the given problem.
While(true):
print "Enter 1 to monitor Animal"
print "Enter 2 to monitor habitat"
print "Enter 3 exit"
option = int(raw_input())
if(option = 1):
print "Enter 1 for details on lion"
print "Enter 2 for details on tiger"
print "Enter 3 for details on bears"
print "Enter 3 for details on giraphes"
option = int(raw_input())
if(option == 1):
Read_info_of_lions();
display_info_of_lions();
elif(option == 2):
Read_info_of_tigers();
display_info_of_tigers();
elif(option == 3):
Read_info_of_bears();
display_info_of_bears();
elif(option == 4):
Read_info_of_giraffes();
display_info_of_giraffes();
print "Enter 1 To go to main menu and 2 to exit!"
option = int(raw_input())
if(option == 1):
continue()
else:
exit()
elif(option == 2):
print "Enter 1 for details on penguin habitat"
print "Enter 2 for details on bird house"
print "Enter 3 for details on aquarium"
option = int(raw_input())
if(option == 1):
Read_info_of_penguins();
display_info_of_penguins();
elif(option == 2):
Read_info_of_bird_house();
display_info_of_bird_house();
elif(option == 3):
Read_info_of_aquarium();
display_info_of_aquarium();
print "Enter 1 To go to main menu and 2 to exit!"
option = int(raw_input())
if(option == 1):
continue()
else:
exit()
else:
exit()

More Related Content

Similar to Monitoring System As a zookeeper, is important to it know the activi.pdf

Functional annotation
Functional annotationFunctional annotation
Functional annotation
Ravi Gandham
 
In this project you will define some interfaces, abstract classes, a.pdf
In this project you will define some interfaces, abstract classes, a.pdfIn this project you will define some interfaces, abstract classes, a.pdf
In this project you will define some interfaces, abstract classes, a.pdf
fathimaoptical
 
C++ Programming Polymorphism Assignment InstructionsOverview 
C++ Programming Polymorphism Assignment InstructionsOverview C++ Programming Polymorphism Assignment InstructionsOverview 
C++ Programming Polymorphism Assignment InstructionsOverview 
TawnaDelatorrejs
 
The purpose of this project is to give students more exposure to obje.pdf
The purpose of this project is to give students more exposure to obje.pdfThe purpose of this project is to give students more exposure to obje.pdf
The purpose of this project is to give students more exposure to obje.pdf
forwardcom41
 
Genetics,PlantBreeding,andSelectionHands-on labs, inc..docx
Genetics,PlantBreeding,andSelectionHands-on labs, inc..docxGenetics,PlantBreeding,andSelectionHands-on labs, inc..docx
Genetics,PlantBreeding,andSelectionHands-on labs, inc..docx
budbarber38650
 
Chapter03 2
Chapter03 2Chapter03 2
Chapter03 2
Sue Pearson
 
4.food_chains_and_food_webs ste 7.pptx
4.food_chains_and_food_webs ste 7.pptx4.food_chains_and_food_webs ste 7.pptx
4.food_chains_and_food_webs ste 7.pptx
JobanieAmadhay1
 

Similar to Monitoring System As a zookeeper, is important to it know the activi.pdf (7)

Functional annotation
Functional annotationFunctional annotation
Functional annotation
 
In this project you will define some interfaces, abstract classes, a.pdf
In this project you will define some interfaces, abstract classes, a.pdfIn this project you will define some interfaces, abstract classes, a.pdf
In this project you will define some interfaces, abstract classes, a.pdf
 
C++ Programming Polymorphism Assignment InstructionsOverview 
C++ Programming Polymorphism Assignment InstructionsOverview C++ Programming Polymorphism Assignment InstructionsOverview 
C++ Programming Polymorphism Assignment InstructionsOverview 
 
The purpose of this project is to give students more exposure to obje.pdf
The purpose of this project is to give students more exposure to obje.pdfThe purpose of this project is to give students more exposure to obje.pdf
The purpose of this project is to give students more exposure to obje.pdf
 
Genetics,PlantBreeding,andSelectionHands-on labs, inc..docx
Genetics,PlantBreeding,andSelectionHands-on labs, inc..docxGenetics,PlantBreeding,andSelectionHands-on labs, inc..docx
Genetics,PlantBreeding,andSelectionHands-on labs, inc..docx
 
Chapter03 2
Chapter03 2Chapter03 2
Chapter03 2
 
4.food_chains_and_food_webs ste 7.pptx
4.food_chains_and_food_webs ste 7.pptx4.food_chains_and_food_webs ste 7.pptx
4.food_chains_and_food_webs ste 7.pptx
 

More from 4babies2010

Find the domain of the function. (Enter your answer using interval no.pdf
Find the domain of the function. (Enter your answer using interval no.pdfFind the domain of the function. (Enter your answer using interval no.pdf
Find the domain of the function. (Enter your answer using interval no.pdf
4babies2010
 
factors that are significant in the development of disease includ.pdf
factors that are significant in the development of disease includ.pdffactors that are significant in the development of disease includ.pdf
factors that are significant in the development of disease includ.pdf
4babies2010
 
economic institutions 8. According to Thomas Piketty, what is the si.pdf
economic institutions 8. According to Thomas Piketty, what is the si.pdfeconomic institutions 8. According to Thomas Piketty, what is the si.pdf
economic institutions 8. According to Thomas Piketty, what is the si.pdf
4babies2010
 
Discuss bio films , formation location etc Discuss bio films , .pdf
Discuss bio films , formation location etc Discuss bio films , .pdfDiscuss bio films , formation location etc Discuss bio films , .pdf
Discuss bio films , formation location etc Discuss bio films , .pdf
4babies2010
 
Discuss the importance of documentation in the medical record.So.pdf
Discuss the importance of documentation in the medical record.So.pdfDiscuss the importance of documentation in the medical record.So.pdf
Discuss the importance of documentation in the medical record.So.pdf
4babies2010
 
Determine the molecular geometry of CO32â».Solution .pdf
Determine the molecular geometry of CO32â».Solution           .pdfDetermine the molecular geometry of CO32â».Solution           .pdf
Determine the molecular geometry of CO32â».Solution .pdf
4babies2010
 
Define each class of incident.types of incidents classifcationsr.pdf
Define each class of incident.types of incidents classifcationsr.pdfDefine each class of incident.types of incidents classifcationsr.pdf
Define each class of incident.types of incidents classifcationsr.pdf
4babies2010
 
Complete a force field analysis for an organization with which you a.pdf
Complete a force field analysis for an organization with which you a.pdfComplete a force field analysis for an organization with which you a.pdf
Complete a force field analysis for an organization with which you a.pdf
4babies2010
 
Write CC++ a program that inputs a weighted undirected graph and fi.pdf
Write CC++ a program that inputs a weighted undirected graph and fi.pdfWrite CC++ a program that inputs a weighted undirected graph and fi.pdf
Write CC++ a program that inputs a weighted undirected graph and fi.pdf
4babies2010
 
Why was the iodide ion successful for the SN2 reactions What if you.pdf
Why was the iodide ion successful for the SN2 reactions What if you.pdfWhy was the iodide ion successful for the SN2 reactions What if you.pdf
Why was the iodide ion successful for the SN2 reactions What if you.pdf
4babies2010
 
What were the triumphs and limitations of democracy in Periclean Ath.pdf
What were the triumphs and limitations of democracy in Periclean Ath.pdfWhat were the triumphs and limitations of democracy in Periclean Ath.pdf
What were the triumphs and limitations of democracy in Periclean Ath.pdf
4babies2010
 
What process causes plant ion-uptake to acidify soil What soil pH r.pdf
What process causes plant ion-uptake to acidify soil What soil pH r.pdfWhat process causes plant ion-uptake to acidify soil What soil pH r.pdf
What process causes plant ion-uptake to acidify soil What soil pH r.pdf
4babies2010
 
what is the name and stereochemistry of the compoundSolution.pdf
what is the name and stereochemistry of the compoundSolution.pdfwhat is the name and stereochemistry of the compoundSolution.pdf
what is the name and stereochemistry of the compoundSolution.pdf
4babies2010
 
What are some of the architectural decisions that you need to make w.pdf
What are some of the architectural decisions that you need to make w.pdfWhat are some of the architectural decisions that you need to make w.pdf
What are some of the architectural decisions that you need to make w.pdf
4babies2010
 
What are lichens What are foliose lichensSolutionAnswers .pdf
What are lichens  What are foliose lichensSolutionAnswers .pdfWhat are lichens  What are foliose lichensSolutionAnswers .pdf
What are lichens What are foliose lichensSolutionAnswers .pdf
4babies2010
 
These are questions to be answered in a paper about the Chernobyl in.pdf
These are questions to be answered in a paper about the Chernobyl in.pdfThese are questions to be answered in a paper about the Chernobyl in.pdf
These are questions to be answered in a paper about the Chernobyl in.pdf
4babies2010
 
The following is the (incomplete) header file for the class Fracti.pdf
The following is the (incomplete) header file for the class Fracti.pdfThe following is the (incomplete) header file for the class Fracti.pdf
The following is the (incomplete) header file for the class Fracti.pdf
4babies2010
 
The adjusted trial balance for Tybalt Construction as of December 31.pdf
The adjusted trial balance for Tybalt Construction as of December 31.pdfThe adjusted trial balance for Tybalt Construction as of December 31.pdf
The adjusted trial balance for Tybalt Construction as of December 31.pdf
4babies2010
 
Summarize the case Surgery Iturralde v. Hilo Medical Center USA , i.pdf
Summarize the case Surgery Iturralde v. Hilo Medical Center USA , i.pdfSummarize the case Surgery Iturralde v. Hilo Medical Center USA , i.pdf
Summarize the case Surgery Iturralde v. Hilo Medical Center USA , i.pdf
4babies2010
 
Suppose we draw 2 cards out of a deck of 52. Let A = “the first card.pdf
Suppose we draw 2 cards out of a deck of 52. Let A = “the first card.pdfSuppose we draw 2 cards out of a deck of 52. Let A = “the first card.pdf
Suppose we draw 2 cards out of a deck of 52. Let A = “the first card.pdf
4babies2010
 

More from 4babies2010 (20)

Find the domain of the function. (Enter your answer using interval no.pdf
Find the domain of the function. (Enter your answer using interval no.pdfFind the domain of the function. (Enter your answer using interval no.pdf
Find the domain of the function. (Enter your answer using interval no.pdf
 
factors that are significant in the development of disease includ.pdf
factors that are significant in the development of disease includ.pdffactors that are significant in the development of disease includ.pdf
factors that are significant in the development of disease includ.pdf
 
economic institutions 8. According to Thomas Piketty, what is the si.pdf
economic institutions 8. According to Thomas Piketty, what is the si.pdfeconomic institutions 8. According to Thomas Piketty, what is the si.pdf
economic institutions 8. According to Thomas Piketty, what is the si.pdf
 
Discuss bio films , formation location etc Discuss bio films , .pdf
Discuss bio films , formation location etc Discuss bio films , .pdfDiscuss bio films , formation location etc Discuss bio films , .pdf
Discuss bio films , formation location etc Discuss bio films , .pdf
 
Discuss the importance of documentation in the medical record.So.pdf
Discuss the importance of documentation in the medical record.So.pdfDiscuss the importance of documentation in the medical record.So.pdf
Discuss the importance of documentation in the medical record.So.pdf
 
Determine the molecular geometry of CO32â».Solution .pdf
Determine the molecular geometry of CO32â».Solution           .pdfDetermine the molecular geometry of CO32â».Solution           .pdf
Determine the molecular geometry of CO32â».Solution .pdf
 
Define each class of incident.types of incidents classifcationsr.pdf
Define each class of incident.types of incidents classifcationsr.pdfDefine each class of incident.types of incidents classifcationsr.pdf
Define each class of incident.types of incidents classifcationsr.pdf
 
Complete a force field analysis for an organization with which you a.pdf
Complete a force field analysis for an organization with which you a.pdfComplete a force field analysis for an organization with which you a.pdf
Complete a force field analysis for an organization with which you a.pdf
 
Write CC++ a program that inputs a weighted undirected graph and fi.pdf
Write CC++ a program that inputs a weighted undirected graph and fi.pdfWrite CC++ a program that inputs a weighted undirected graph and fi.pdf
Write CC++ a program that inputs a weighted undirected graph and fi.pdf
 
Why was the iodide ion successful for the SN2 reactions What if you.pdf
Why was the iodide ion successful for the SN2 reactions What if you.pdfWhy was the iodide ion successful for the SN2 reactions What if you.pdf
Why was the iodide ion successful for the SN2 reactions What if you.pdf
 
What were the triumphs and limitations of democracy in Periclean Ath.pdf
What were the triumphs and limitations of democracy in Periclean Ath.pdfWhat were the triumphs and limitations of democracy in Periclean Ath.pdf
What were the triumphs and limitations of democracy in Periclean Ath.pdf
 
What process causes plant ion-uptake to acidify soil What soil pH r.pdf
What process causes plant ion-uptake to acidify soil What soil pH r.pdfWhat process causes plant ion-uptake to acidify soil What soil pH r.pdf
What process causes plant ion-uptake to acidify soil What soil pH r.pdf
 
what is the name and stereochemistry of the compoundSolution.pdf
what is the name and stereochemistry of the compoundSolution.pdfwhat is the name and stereochemistry of the compoundSolution.pdf
what is the name and stereochemistry of the compoundSolution.pdf
 
What are some of the architectural decisions that you need to make w.pdf
What are some of the architectural decisions that you need to make w.pdfWhat are some of the architectural decisions that you need to make w.pdf
What are some of the architectural decisions that you need to make w.pdf
 
What are lichens What are foliose lichensSolutionAnswers .pdf
What are lichens  What are foliose lichensSolutionAnswers .pdfWhat are lichens  What are foliose lichensSolutionAnswers .pdf
What are lichens What are foliose lichensSolutionAnswers .pdf
 
These are questions to be answered in a paper about the Chernobyl in.pdf
These are questions to be answered in a paper about the Chernobyl in.pdfThese are questions to be answered in a paper about the Chernobyl in.pdf
These are questions to be answered in a paper about the Chernobyl in.pdf
 
The following is the (incomplete) header file for the class Fracti.pdf
The following is the (incomplete) header file for the class Fracti.pdfThe following is the (incomplete) header file for the class Fracti.pdf
The following is the (incomplete) header file for the class Fracti.pdf
 
The adjusted trial balance for Tybalt Construction as of December 31.pdf
The adjusted trial balance for Tybalt Construction as of December 31.pdfThe adjusted trial balance for Tybalt Construction as of December 31.pdf
The adjusted trial balance for Tybalt Construction as of December 31.pdf
 
Summarize the case Surgery Iturralde v. Hilo Medical Center USA , i.pdf
Summarize the case Surgery Iturralde v. Hilo Medical Center USA , i.pdfSummarize the case Surgery Iturralde v. Hilo Medical Center USA , i.pdf
Summarize the case Surgery Iturralde v. Hilo Medical Center USA , i.pdf
 
Suppose we draw 2 cards out of a deck of 52. Let A = “the first card.pdf
Suppose we draw 2 cards out of a deck of 52. Let A = “the first card.pdfSuppose we draw 2 cards out of a deck of 52. Let A = “the first card.pdf
Suppose we draw 2 cards out of a deck of 52. Let A = “the first card.pdf
 

Recently uploaded

The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
Israel Genealogy Research Association
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
Priyankaranawat4
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
amberjdewit93
 
Community pharmacy- Social and preventive pharmacy UNIT 5
Community pharmacy- Social and preventive pharmacy UNIT 5Community pharmacy- Social and preventive pharmacy UNIT 5
Community pharmacy- Social and preventive pharmacy UNIT 5
sayalidalavi006
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
adhitya5119
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
David Douglas School District
 
MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
Colégio Santa Teresinha
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
heathfieldcps1
 
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
GeorgeMilliken2
 
DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
taiba qazi
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
AyyanKhan40
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
Celine George
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
Nicholas Montgomery
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
Nguyen Thanh Tu Collection
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Akanksha trivedi rama nursing college kanpur.
 
How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17
Celine George
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
Nicholas Montgomery
 
BBR 2024 Summer Sessions Interview Training
BBR  2024 Summer Sessions Interview TrainingBBR  2024 Summer Sessions Interview Training
BBR 2024 Summer Sessions Interview Training
Katrina Pritchard
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
Academy of Science of South Africa
 

Recently uploaded (20)

The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
 
Community pharmacy- Social and preventive pharmacy UNIT 5
Community pharmacy- Social and preventive pharmacy UNIT 5Community pharmacy- Social and preventive pharmacy UNIT 5
Community pharmacy- Social and preventive pharmacy UNIT 5
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
 
MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
 
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
 
DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
 
How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
 
BBR 2024 Summer Sessions Interview Training
BBR  2024 Summer Sessions Interview TrainingBBR  2024 Summer Sessions Interview Training
BBR 2024 Summer Sessions Interview Training
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
 

Monitoring System As a zookeeper, is important to it know the activi.pdf

  • 1. Monitoring System As a zookeeper, is important to it 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, or exit Displays a list of animal options (based on the previous selection) as read from either the animals or habitats file o Asks the user to enter one of the options Displays the monitoring information by finding the appropriate section in the file Separates sections by the category and selection (such as "Animal Lion" or "Habitat-Penguin Uses a dialog box to alert the zookeeper ifthe 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 the dialog.) Allows a user to return to the original options Details on lions Details on penguin habitat Details on bird house Details on tigers Details on aquarium Details on bears Details on giraffes Habitat Penguin Animal Lion Temperature: Freezing Food source Fish in water running low Name: Leo Cleanliness Passed Age: 5 Health concerns Cut on left front paw Habitat Bird Feeding schedule: Twice daily Temperature: Moderate Food source: Natural from environment Animal Tiger Cleanliness Passed Name: Ma Age: 15 Health concerns None Habitat Aquarium Temperature: Varies with output temperature Feeding schedule 3x daily Food source: Added daily Cleanliness Needs cleaning from algae Animal Bear Name: Baloo Age: 1 Health concerns None Feeding schedule: None on record Animal Giraffe Name: Spots Age 12 Health concerns: None Feeding schedule Grazing Below was the inital answer, can someone assist in transcribing thsi into "code"? 1. FileReader with BufferedReader and FileWriter with PrintWriter can be used for file I/O , line wise . Each line with several Strings also called as token can be separated using split() on blank space while retrieval . 2. End of file is denoted by -1 . The file can be iterated till the desired token is obtained , using a while loop . eg. b can be a boolean variable intialized to true ,eg. while(b) . once the token is obtained the b can be set to false . 3. To gather Information and display to the user , the token for choice can be searched and corresponding data can be appended to StringBuilder token wise , till token for next category starts or end of file and displayed using toString() method .eg. ***** is also a token or word string which can be gathered into an String array , by split() method on each line extracted using readLine() . Token comparison is done with isEquals("") 4. For User Menu Options , Scanner can be used for user input along with getString etc. and switch case construct can be used for processing of user choice from menu . System.out.print() for display to user messages . 5. To allow user to the previous option another super while loop can be used within which the other looops done so that user can be presented the original options again . Monitoring System
  • 2. 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, or exit Displays a list of anima options (based on the previous selection) as read from either the animals or habitats file o Asks the user to enter one of the options Displays the monitoring information by finding the appropriate section in the file 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 ofthe normal range (These will be denoted in the files by a new line starting with Do not display the asterisks in the dialog Allows a user to return to the original options Details on penguin habitat Details on lions Details on bird house Details on tigers Details on bears Details on aquarium Details on giraffes Habitat Penguin Animal Lion Temperature: Freezing Food source: Fish in water running low Name Leo Cleanliness: Passed Age: 5 """""Health concerns: cut on left front paw Habitat Bird Feeding schedule: Twice daily Temperature: Moderate Food source: Natural from environment Animal Tige Cleanliness: Passed Name: Maj Age: 15 Health concerns None Habitat Aquarium Temperature: Varies with output temperature Feeding schedule: 3x daily Food source: Added daily Cleanliness Needs cleaning from algae Animal Bear Name: Baloo Age: 1 Health concerns None Feeding schedule None on record Animal Giraffe Name: Spots Age: 12 Health concerns: None Feeding schedule Grazing Solution Psudocode for the given problem. While(true): print "Enter 1 to monitor Animal" print "Enter 2 to monitor habitat" print "Enter 3 exit" option = int(raw_input()) if(option = 1): print "Enter 1 for details on lion" print "Enter 2 for details on tiger" print "Enter 3 for details on bears" print "Enter 3 for details on giraphes" option = int(raw_input()) if(option == 1): Read_info_of_lions(); display_info_of_lions();
  • 3. elif(option == 2): Read_info_of_tigers(); display_info_of_tigers(); elif(option == 3): Read_info_of_bears(); display_info_of_bears(); elif(option == 4): Read_info_of_giraffes(); display_info_of_giraffes(); print "Enter 1 To go to main menu and 2 to exit!" option = int(raw_input()) if(option == 1): continue() else: exit() elif(option == 2): print "Enter 1 for details on penguin habitat" print "Enter 2 for details on bird house" print "Enter 3 for details on aquarium" option = int(raw_input()) if(option == 1): Read_info_of_penguins(); display_info_of_penguins(); elif(option == 2): Read_info_of_bird_house(); display_info_of_bird_house(); elif(option == 3): Read_info_of_aquarium(); display_info_of_aquarium(); print "Enter 1 To go to main menu and 2 to exit!" option = int(raw_input()) if(option == 1): continue() else: exit() else: