Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package monitoringsystem;
- import javax.swing.*;
- public class MonitoringSystem {
- public static void main(String[] args) {
- String input = "";
- input = JOptionPane.showInputDialog("Choose and option of which you want to monitor.");
- if(input.equalsIgnoreCase("animals")){
- JFrame frame = new JFrame("Animals to monitor");
- JOptionPane.showMessageDialog(frame, "Welcome to the animal list \n Lions \n Tigers \n Bears \n Giraffes ");
- JFrame frame1 = new JFrame("Which animal are you monitoring");
- JOptionPane.showInputDialog("Enter an animal of your choice.");
- }
- if(input.equalsIgnoreCase("lions")){
- JFrame frame2 = new JFrame("Lion's details");
- JOptionPane.showMessageDialog(frame2, "Details on Lions\n Name: Leo\nAge: 5\nHealth concerns: Cut on left front paw\nFeeding Schedule: Twice daily");
- }
- else if(input.equalsIgnoreCase("tigers")){
- JFrame frame3 = new JFrame("Tiger's details");
- JOptionPane.showMessageDialog(frame3, "Details on Tigers\nName: Maj\nAge: 15\nHealth concerns: None\nFeeding Schedule: 3x daily");
- }
- else if(input.equalsIgnoreCase("bears")){
- JFrame frame4 = new JFrame("Bear's details");
- JOptionPane.showMessageDialog(frame4, "Details on Bears \n Name: Baloo\n Age: 1\nHeath concerns: None\nFeeding Schedule: None on record");
- }
- else if(input.equalsIgnoreCase("giraffes")){
- JFrame frame5 = new JFrame("Giraffe's details");
- JOptionPane.showMessageDialog(frame5, "Details on Giraffes\nName: Spots\nAge: 12\nHealth concerns: None\nFeeding Schedule: Grazing");
- }
- else if(input.equalsIgnoreCase("habitat")){
- JFrame frame6 = new JFrame("Habitats to monitor");
- JOptionPane.showMessageDialog(frame6, "Welcome to the habitat list");
- JFrame frame7 = new JFrame ("Which animal are you monitoring");
- JOptionPane.showInputDialog("Enter a habitat of your choice.");
- JFrame frame8 = new JFrame("Penguins habitat");
- JOptionPane.showMessageDialog(frame8, "Details on Penguin habitat\nTemperature: Freezing\nFood source: Fish in water running low\nCleanliness: Passed");
- JFrame frame9 = new JFrame("Penguins habitat");
- JOptionPane.showMessageDialog(frame9, "Details on Bird house\nTemperature: Moderate\nFoodsource: Natural from environment\nCleanliness: Passed");
- JFrame frame10 = new JFrame("Penguins habitat");
- JOptionPane.showMessageDialog(frame10, "Details on Aquarium\nTemperature: Varies with output temperature\nFood Source: Added daily\nCleanliness: Needs cleaning from algae");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement