Created
April 16, 2019 14:05
-
-
Save xarizma/9946e8cfe99243a133bf9f45c0b6930b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.company; | |
import java.util.Objects; | |
import java.util.Scanner; | |
public class Bank { | |
public static void main(String[] args) { | |
Scanner scanner = new Scanner(System.in); | |
System.out.println(" добро пожаловать в наш банк ! для перехода в меню введите 'menu'"); | |
String input = scanner.next(); | |
if (!Objects.equals(input, "menu")) { | |
return; | |
} | |
Menu.Menu(); | |
} | |
static void info(String name, int age, int deposit, int credit) { | |
System.out.println("Имя - " + name + " Возраст - " + age + | |
" deposit - " + deposit + " credit - " + credit); | |
} | |
static double deposit() { | |
System.out.println("Сколько денег вы хотите внести(рубл)?"); | |
Scanner scanner = new Scanner(System.in); | |
int input = scanner.nextInt(); | |
return input; | |
} | |
static double credit(int salary, boolean check) { | |
double temp = salary * 0.4; | |
if (check) { | |
temp = temp * 12; | |
} else { | |
temp = temp * 10; | |
} | |
return temp; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.company; | |
public class Client { | |
String name; | |
int age; | |
int deposit = 0; | |
int credit = 0; | |
Client(String name, int age) { | |
this.name = name; | |
this.age = age; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment