Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 2.96 KB | None | 0 0
  1. package monitoringsystem;
  2. import javax.swing.*;
  3.  
  4. public class MonitoringSystem {
  5.  
  6.     public static void main(String[] args) {
  7.        
  8.        
  9.         String input = "";
  10.        
  11.         input = JOptionPane.showInputDialog("Choose and option of which you want to monitor.");
  12.        
  13.         if(input.equalsIgnoreCase("animals")){
  14.            
  15.             JFrame frame = new JFrame("Animals to monitor");
  16.             JOptionPane.showMessageDialog(frame, "Welcome to the animal list \n Lions \n Tigers \n Bears \n Giraffes ");
  17.            
  18.             JFrame frame1 = new JFrame("Which animal are you monitoring");
  19.             JOptionPane.showInputDialog("Enter an animal of your choice.");
  20.         }
  21.         if(input.equalsIgnoreCase("lions")){
  22.            
  23.             JFrame frame2 = new JFrame("Lion's details");
  24.             JOptionPane.showMessageDialog(frame2, "Details on Lions\n Name: Leo\nAge: 5\nHealth concerns: Cut on left front paw\nFeeding Schedule: Twice daily");
  25.         }
  26.         else if(input.equalsIgnoreCase("tigers")){
  27.            
  28.             JFrame frame3 = new JFrame("Tiger's details");
  29.             JOptionPane.showMessageDialog(frame3, "Details on Tigers\nName: Maj\nAge: 15\nHealth concerns: None\nFeeding Schedule: 3x daily");
  30.         }
  31.         else if(input.equalsIgnoreCase("bears")){
  32.            
  33.             JFrame frame4 = new JFrame("Bear's details");
  34.             JOptionPane.showMessageDialog(frame4, "Details on Bears \n Name: Baloo\n Age: 1\nHeath concerns: None\nFeeding Schedule: None on record");
  35.         }
  36.         else if(input.equalsIgnoreCase("giraffes")){
  37.            
  38.             JFrame frame5 = new JFrame("Giraffe's details");
  39.             JOptionPane.showMessageDialog(frame5, "Details on Giraffes\nName: Spots\nAge: 12\nHealth concerns: None\nFeeding Schedule: Grazing");
  40.            
  41.         }
  42.         else if(input.equalsIgnoreCase("habitat")){
  43.            
  44.             JFrame frame6 = new JFrame("Habitats to monitor");
  45.             JOptionPane.showMessageDialog(frame6, "Welcome to the habitat list");
  46.            
  47.             JFrame frame7 = new JFrame ("Which animal are you monitoring");
  48.             JOptionPane.showInputDialog("Enter a habitat of your choice.");
  49.            
  50.             JFrame frame8 = new JFrame("Penguins habitat");
  51.             JOptionPane.showMessageDialog(frame8, "Details on Penguin habitat\nTemperature: Freezing\nFood source: Fish in water running low\nCleanliness: Passed");
  52.            
  53.             JFrame frame9 = new JFrame("Penguins habitat");
  54.             JOptionPane.showMessageDialog(frame9, "Details on Bird house\nTemperature: Moderate\nFoodsource: Natural from environment\nCleanliness: Passed");
  55.            
  56.             JFrame frame10 = new JFrame("Penguins habitat");
  57.             JOptionPane.showMessageDialog(frame10, "Details on Aquarium\nTemperature: Varies with output temperature\nFood Source: Added daily\nCleanliness: Needs cleaning from algae");
  58.          }
  59.     }
  60.    
  61. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement