当前位置:网站首页>Learning practice: comprehensive application of cycle and branch structure (II)
Learning practice: comprehensive application of cycle and branch structure (II)
2022-07-01 09:12:00 【ICErain0201】
Bank ATM User operating system demo
requirement : Execute the corresponding account opening according to the user's input 、 deposit 、 Change the password and other operations , Repeatable operation , Input 0 sign out
、
package homework2;
import java.util.Scanner;
/**
* Bank ATM operation demo
* Required :switch、do while
* @author ICErain
*
*/
public class Test1 {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
int num ;
// use do while Statement executes multiple operations of the user
do {
System.out.println("====================================================");
System.out.println("=================== Welcome to use ATM System ===================");
System.out.println("1. Accounts 2. deposit 3. Withdraw money 4. Transfer accounts 5. Check the balance 6. Change Password 0. sign out ");
System.out.println("====================================================");
num = input.nextInt();
// use switch Branches perform different user actions
switch (num) {
case 1:
System.out.println(" Perform account opening operation ");
break;
case 2:
System.out.println(" Perform deposit operation ");
break;
case 3:
System.out.println(" Perform the withdrawal operation ");
break;
case 4:
System.out.println(" Perform transfer operations ");
break;
case 5:
System.out.println(" To query the balance ");
break;
case 6:
System.out.println(" Perform password modification ");
break;
case 0:
break;
default:
System.out.println(" Please re-enter the correct number ");
}
} while (num!=0);
System.out.println(" exit from application program , Welcome to use next time ");
}
}

( chart 1)

( chart 2)

( chart 3)

( chart 4)
chart 1 Welcome interface for users
chart 2 For input 1 To 6 Carry out corresponding operations between
chart 3 Enter other non 0 Number of hours prompt dislocation
chart 4 For input 0 End the program at
Please have a look at Yaqing !
边栏推荐
- Shell脚本-echo命令 转义符
- Shell script -if else statement
- The jar package embedded with SQLite database is deployed by changing directories on the same machine, and the newly added database records are gone
- [ESP nanny level tutorial] crazy completion chapter - Case: gy906 infrared temperature measurement access card swiping system based on the Internet of things
- Principle and application of single chip microcomputer timer, serial communication and interrupt system
- dsPIC30F6014a LCD 方块显示
- What are the differences between the architecture a, R and m of arm V7, and in which fields are they applied?
- Record a redis timeout
- Shell脚本-数组定义以及获取数组元素
- Promise异步编程
猜你喜欢

队列的实现和应用

Bird recognition app

TV size and viewing distance

What are the differences between the architecture a, R and m of arm V7, and in which fields are they applied?

2.2 【pytorch】torchvision.transforms

FreeRTOS learning easy notes

Understanding and implementation of AVL tree

An overview of the design of royalties and service fees of mainstream NFT market platforms

How to manage fixed assets efficiently in one stop?

【pytorch】softmax函数
随机推荐
Set the type of the input tag to number, and remove the up and down arrows
[ESP nanny level tutorial preview] crazy node JS server - Case: esp8266 + DS18B20 temperature sensor +nodejs local service + MySQL database
Shell script - definition, assignment and deletion of variables
[MFC development (17)] advanced list control list control
Jetson Nano 安装TensorFlow GPU及问题解决
Databinding source code analysis
Pain points and solutions of fixed assets management of group companies
How to manage fixed assets well? Easy to point and move to provide intelligent solutions
【ESP 保姆级教程】疯狂毕设篇 —— 案例:基于物联网的GY906红外测温门禁刷卡系统
Shell脚本-for循环和for int循环
猿人学第20题(题目会不定时更新)
Installing Oracle EE
Win7 pyinstaller reports an error DLL load failed while importing after packaging exe_ Socket: parameter error
【ESP 保姆级教程 预告】疯狂Node.js服务器篇 ——案例:ESP8266 + MQ系列 + NodeJs本地服务 + MySql存储
3D打印Arduino 四轴飞行器
Shell script - special variables: shell $, $*, [email protected], $$$
3D printing Arduino four axis aircraft
Flink面试题
Design and manufacture of simple digital display electronic scale
[pytorch] softmax function