Alice in Wonderland is an upcoming fantasy-adventure film directed by Tim Burton. It is an extension to the Lewis Carroll novels Alice’s Adventures in Wonderland and Through the Looking-Glass. The film will use a [...]
PERBANKAN
DOWNLOAD 4SHARED : http://www.4shared.com/file/HRjV_ln0/bank.htmlimport java.io.*;
class Personal
{
static BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
static int MENU() throws Exception
{
System.out.println("1. masukan Transaksi");
System.out.println("2. lihat Saldo");
System.out.println("3. lihat semua Transaksi");
System.out.println("4. Keluar");
System.out.print("Pilihan : ");
return Integer.parseInt(in.readLine());
}
public static void main(String[] args) throws Exception
{
int saldo = 0;
int count = 0;
Transaksi[] t = new Transaksi[100];
do
{
int pil = MENU();
if(pil == 1)
{
t[count] = new Transaksi();
System.out.print("Tanggal : ");
t[count].setTgl(in.readLine());
System.out.print("Nominal : ");
t[count].setNominal(Integer.parseInt(in.readLine()));
System.out.print("Keterangan : ");
t[count].setKet(in.readLine());
System.out.print("Status : ");
t[count].setStatus(in.readLine());
if(t[count].getStatus().equals("debet"))
{
saldo += t[count].getNominal();
}
else
{
saldo -= t[count].getNominal();
}
count ++;
}
else if(pil == 2)
{
System.out.println("Saldo : " + saldo);
}
else if(pil == 3)
{
System.out.println("Tgl\t\tNominal\t\tKeterangan\tStatus");
for(int i=0;i<count;i++)
{
System.out.println(t[i].getTgl() + "\t\t" + t[i].getNominal() + "\t\t" + t[i].getKet() + "\t\t" + t[i].getStatus());
}
}
else if(pil == 4)
{
System.exit(0);
}
System.out.println();
}
while(true);
}
}
NAMA : FREDY PRIYAMBODO
NIM : 10.41010.0200
Tags: TUAGS PBO
Share this post:
Langganan:
Posting Komentar (Atom)
0 komentar:
Posting Komentar