Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // SPENCER CODY CHIRMAN
- // DISCUSSION 6
- // FEBRUARY 20, 2020
- // CMIS 141 INTRODUCTORY PROGRAMMING
- // UNIVERSITY OF MARYLAND GLOBAL CAMPUS
- // MAIN CLASS
- import java.util.Scanner;
- public class Main
- {
- static Scanner input;
- static SecurityCamera camera1;
- public static void main(String[] args) {
- input = new Scanner(System.in);
- String name = new String();
- System.out.println("SECURITY CAMERA PROGRAM");
- System.out.print("name your camera: ");
- name = input.nextLine();
- SecurityCamera camera1 = new SecurityCamera(name);
- System.out.println("camera " + name + " created");
- boolean b = true;
- while(b == true) {
- System.out.println("\nPROMPT: type \"start\" or \"stop\" to begin or end recording, type \"end\" to terminate program");
- String action = input.next();
- if(action.equals("start")) {
- camera1.startRecording();
- } else if (action.equals("stop")) {
- camera1.stopRecording();
- } else if (action.equals("end")) {
- b = false;
- System.out.println("TERMINATING PROGRAM...");
- } else {
- System.out.println("ERROR: command not recognized.");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement