Commit c375e9c7 authored by aurian.foulner's avatar aurian.foulner

origin

parents
{
"java.project.sourcePaths": ["src"],
"java.project.outputPath": "bin",
"java.project.referencedLibraries": [
"lib/**/*.jar"
]
}
## Getting Started
Welcome to the VS Code Java world. Here is a guideline to help you get started to write Java code in Visual Studio Code.
## Folder Structure
The workspace contains two folders by default, where:
- `src`: the folder to maintain sources
- `lib`: the folder to maintain dependencies
Meanwhile, the compiled output files will be generated in the `bin` folder by default.
> If you want to customize the folder structure, open `.vscode/settings.json` and update the related settings there.
## Dependency Management
The `JAVA PROJECTS` view allows you to manage your dependencies. More details can be found [here](https://github.com/microsoft/vscode-java-dependency#manage-dependencies).
File added
File added
import java.util.Scanner;
public class bank{
static String Name;
static int AccountNumber;
static int Balance;
static Scanner sc = new Scanner(System.in);
public bank (String Name, Integer AccountNumber, Integer Balance){
bank.Name = Name;
bank.AccountNumber = AccountNumber;
bank.Balance = Balance;
}
public static void main(String[] args){
bank Aurian = new bank(Name = "Aurian", AccountNumber = 3121, Balance = 2000);
Open(Aurian);
Deposit(Aurian);
Withdraw(Aurian);
BankFees(Aurian);
AccureInterest(Aurian);
}
public static void Open(bank details){
System.out.println("Name: " + Name);
System.out.println("Account Number: " + AccountNumber);
System.out.println("Balance: " + Balance);
}
public static void BankFees ( bank details){
System.out.println("Bank balance: " + Balance);
Balance = Balance - ((Balance / 100)*5);
System.out.println("Bank Balance after bank fees: " + Balance);
}
public static void AccureInterest(bank details){
System.out.println("Bank balance: " + Balance);
Balance = Balance + ((Balance / 100)*5);
System.out.println("Bank Balance after accuring interest: " + Balance);
}
public static void Deposit (bank details){
int number;
System.out.println("Deposit: ");
number = sc.nextInt();
Balance = number + Balance;
System.out.println("New Balance; " + Balance);
}
public static void Withdraw (bank details){
int number;
System.out.println("Amount you want to withdraw: ");
number = sc.nextInt();
if (Balance < number){
System.out.println("Insufficient bank balance.");}
else{
Balance = Balance - number;
System.out.println("New balance: " + Balance);
}
}
public static void overdraft(bank details){
int number;
int limitNumber;
System.out.println("Bank balance: " + Balance);
System.out.println("Withdrawal amount: ");
number = sc.nextInt();
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment