SlideShare a Scribd company logo
1 of 4
Download to read offline
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 annotationRavi 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.pdffathimaoptical
 
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.pdfforwardcom41
 
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..docxbudbarber38650
 
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.pptxJobanieAmadhay1
 

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.pdf4babies2010
 
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.pdf4babies2010
 
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.pdf4babies2010
 
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 , .pdf4babies2010
 
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.pdf4babies2010
 
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 .pdf4babies2010
 
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.pdf4babies2010
 
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.pdf4babies2010
 
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.pdf4babies2010
 
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.pdf4babies2010
 
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.pdf4babies2010
 
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.pdf4babies2010
 
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.pdf4babies2010
 
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.pdf4babies2010
 
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 .pdf4babies2010
 
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.pdf4babies2010
 
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.pdf4babies2010
 
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.pdf4babies2010
 
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.pdf4babies2010
 
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.pdf4babies2010
 

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

HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxmarlenawright1
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jisc
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptxMaritesTamaniVerdade
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfSherif Taha
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsKarakKing
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...Amil baba
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...pradhanghanshyam7136
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxPooja Bhuva
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxPooja Bhuva
 
Plant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxPlant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxUmeshTimilsina1
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Pooja Bhuva
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxPooja Bhuva
 

Recently uploaded (20)

HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
Plant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxPlant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptx
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
 

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: