Java Fundamentals 4

Source: Internet
Author: User


PackageDvdpackage;ImportJava.util.Scanner; Public classMain { Public Static voidMain (string[] args) {//TODO auto-generated Method Stub intbt1; Scanner input=NewScanner (system.in); Do{System.out.println ("??? Welcome to use the Mini DVD management system??); System.out.println ("------------------"); System.out.println ("? 1. New DVD"); System.out.println ("? 2. View DVD"); System.out.println ("? 3. Delete DVD"); System.out.println ("? 4. Lend a DVD"); System.out.println ("? 5. Return DVD"); System.out.println ("? 6. Exit DVD Management System"); System.out.println ("-------------------"); System.out.println ("Please select the function!" "); BT1=Input.nextint (); Switch(BT1) { Case1:system.out.println ("New DVD"); System.out.println ("Please enter movie name"); Input.next (); Do{SYSTEM.OUT.PRINTLN ("new completed, press 0 to return"); bt1 =input.nextint ();} while(bt1!=0); Break; Case2:system.out.println ("View DVD"); System.out.println ("Please enter the name of the movie you want to see"); Input.next (); Do{System.out.println ("view done, press 0 to return"); bt1 =input.nextint ();} while(bt1!=0); Break; Case3:system.out.println ("Delete DVD"); System.out.println ("Enter the name of the movie you want to delete"); Input.next (); Do{System.out.println ("delete complete, press 0 to return"); bt1 =input.nextint ();} while(bt1!=0); Break; Case4:system.out.println ("Lend a DVD"); System.out.println ("Enter the name of the borrowed movie"); Input.next (); Do{System.out.println ("View loan complete, press 0 to return"); bt1 =input.nextint ();} while(bt1!=0); Break; Case5:system.out.println ("Return DVD"); System.out.println ("Enter the name of the returned movie"); Input.next (); Do{System.out.println ("return completed, press 0"); bt1 =input.nextint ();} while(bt1!=0); Break; Case6:system.out.println ("Exit DVD"); System.out.println ("Do you really want to quit?"); return; default: System.out.println ("Input error, re-enter"); Break; }} while(true); }}

Java Fundamentals 4

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.