Computer Science > Lab Experiment > Middlesex County College CSC 236 lab 2 236.docx-VERIFIED BY EXPERTS (All)
//Rushi Patel //CSC-236-C1 //Program1 package lockclientdemoclass; import java.util.Scanner; public class LockClientDemoClass { public static void main(String [] args) { outputList(); } pub... lic static void outputList() { int x, y, z; Scanner sc = new Scanner(System.in); LockDataStructureClass obj1 = new LockDataStructureClass(); while(true) { System.out.println(" Menu "); System.out.println("\nPick a letter from the list for" + " the lock simulator."); System.out.println(" 1: Set a new lock combination "); System.out.println(" 2: Closes lock"); System.out.println(" 3: Attempt opening lock "); System.out.println(" 4: Lock Status "); System.out.println(" 5: Check current number "); System.out.println(" 6: Exit the program \n"); char outputMenu = sc.next().charAt(0); outputMenu = Character.toUpperCase(outputMenu); switch(outputMenu) { case '1': { System.out.println("\n Enter the first number to set the lock combo."); x = sc.nextInt(); System.out.println("Enter the second number to set the lock combo."); y = sc.nextInt(); System.out.println("Enter the third number to set the lock combo."); z = sc.nextInt(); obj1.alter(); break; }case '2': { obj1.close(); obj1.inquire(LockDataStructureClass.lockOrUnlockStatus); break; } case '3': { System.out.println(""); System.out.println("enter the first number of lock combo."); x = sc.nextInt(); System.out.println("enter the second number of lock combo."); y = sc.nextInt(); System.out.println("enter the third number of lock combo."); z = sc.nextInt(); break; [Show More]
Last updated: 2 years ago
Preview 1 out of 15 pages
Buy this document to get the full access instantly
Instant Download Access after purchase
Buy NowInstant download
We Accept:
Can't find what you want? Try our AI powered Search
Connected school, study & course
About the document
Uploaded On
May 27, 2021
Number of pages
15
Written in
This document has been written for:
Uploaded
May 27, 2021
Downloads
0
Views
89
In Scholarfriends, a student can earn by offering help to other student. Students can help other students with materials by upploading their notes and earn money.
We're available through e-mail, Twitter, Facebook, and live chat.
FAQ
Questions? Leave a message!
Copyright © Scholarfriends · High quality services·