SlideShare a Scribd company logo
import java.util.Scanner;
public class AccountFrame
{
public static void main(String args[])
{
Account account1 = new Account (50.00);
Account account2 = new Account(-7.53);
System.out.printf("account1 balance:$%.2fn".account1.getBalance());
System.out.printf("account2 balance:$
%.2fnn".account2.getBalance());
Scanner input= new Scanner(System.in);
double depositAmount;
System.out.printf("enter deposit amount for account1:");
depositAmount = input.nextDouble();
System.out.printf("nadding %.2f to account1
balancenn".depositAmount);
account1.credit(depositAmount);
System.out.printf("account1 balance: $
%.2fn".account1.getBalance());
System.out.printf("account2 balance: $
%.2fnn".account2.getBalance());
System.out.printf("enter deposit amount for account2:");
depositAmount =input.nextDouble();
System.out.printf("nadding %.2f to account2
balancenn".depositAmount);
account2.credit(depositAmount);
System.out.printf("account1 balance: $
%.2fn".account1.getBalance());
System.out.printf("account2 balance: $
%.2fn".account2.getBalance());
}
}

More Related Content

Viewers also liked

Tugas latihan java tohir 1
Tugas latihan java tohir 1Tugas latihan java tohir 1
Tugas latihan java tohir 1
pencari buku
 
Persiapan UN by MGMP Fisika BPK PENABUR
Persiapan UN by MGMP Fisika BPK PENABURPersiapan UN by MGMP Fisika BPK PENABUR
Persiapan UN by MGMP Fisika BPK PENABUR
guest4f71ffe
 
Soal dan pembahasan tukpd ii tahun 2013
Soal dan pembahasan tukpd ii tahun 2013Soal dan pembahasan tukpd ii tahun 2013
Soal dan pembahasan tukpd ii tahun 2013
Ema Rachmawati
 
Virus dan Antivirus
Virus dan AntivirusVirus dan Antivirus
Virus dan Antivirus
Mohamad TafrikanDemak
 
Soal kompetisi ipa kls ix
Soal kompetisi ipa kls ixSoal kompetisi ipa kls ix
Soal kompetisi ipa kls ix
Ema Rachmawati
 
Kompetisi ipa kelas ix smp 2013 tingkat kecamatan
Kompetisi ipa kelas ix  smp 2013 tingkat kecamatan Kompetisi ipa kelas ix  smp 2013 tingkat kecamatan
Kompetisi ipa kelas ix smp 2013 tingkat kecamatan Ema Rachmawati
 
Kompetisi ipa kelas viii smp 2013 tingkat kecamatan
Kompetisi ipa kelas viii  smp 2013 tingkat kecamatan Kompetisi ipa kelas viii  smp 2013 tingkat kecamatan
Kompetisi ipa kelas viii smp 2013 tingkat kecamatan Ema Rachmawati
 
Soal kompetisi ipa tingkat kecamatan 2009 2010
Soal kompetisi ipa tingkat kecamatan 2009   2010Soal kompetisi ipa tingkat kecamatan 2009   2010
Soal kompetisi ipa tingkat kecamatan 2009 2010
Ema Rachmawati
 
Bab 6 Bioteknologi kelas 9G SMPN 264 Jakarta
Bab 6 Bioteknologi kelas 9G SMPN 264 JakartaBab 6 Bioteknologi kelas 9G SMPN 264 Jakarta
Bab 6 Bioteknologi kelas 9G SMPN 264 Jakarta
Liana Susanti SMPN 248
 
Soal tryout KLS IX (IPA FISIKA)
Soal tryout KLS IX (IPA FISIKA)Soal tryout KLS IX (IPA FISIKA)
Soal tryout KLS IX (IPA FISIKA)Fitri Immawati
 

Viewers also liked (11)

Tugas latihan java tohir 1
Tugas latihan java tohir 1Tugas latihan java tohir 1
Tugas latihan java tohir 1
 
Persiapan UN by MGMP Fisika BPK PENABUR
Persiapan UN by MGMP Fisika BPK PENABURPersiapan UN by MGMP Fisika BPK PENABUR
Persiapan UN by MGMP Fisika BPK PENABUR
 
Soal dan pembahasan tukpd ii tahun 2013
Soal dan pembahasan tukpd ii tahun 2013Soal dan pembahasan tukpd ii tahun 2013
Soal dan pembahasan tukpd ii tahun 2013
 
Virus dan Antivirus
Virus dan AntivirusVirus dan Antivirus
Virus dan Antivirus
 
Soal kompetisi ipa kls ix
Soal kompetisi ipa kls ixSoal kompetisi ipa kls ix
Soal kompetisi ipa kls ix
 
Kompetisi ipa kelas ix smp 2013 tingkat kecamatan
Kompetisi ipa kelas ix  smp 2013 tingkat kecamatan Kompetisi ipa kelas ix  smp 2013 tingkat kecamatan
Kompetisi ipa kelas ix smp 2013 tingkat kecamatan
 
Kompetisi ipa kelas viii smp 2013 tingkat kecamatan
Kompetisi ipa kelas viii  smp 2013 tingkat kecamatan Kompetisi ipa kelas viii  smp 2013 tingkat kecamatan
Kompetisi ipa kelas viii smp 2013 tingkat kecamatan
 
Rumus gerak lurus
Rumus gerak lurusRumus gerak lurus
Rumus gerak lurus
 
Soal kompetisi ipa tingkat kecamatan 2009 2010
Soal kompetisi ipa tingkat kecamatan 2009   2010Soal kompetisi ipa tingkat kecamatan 2009   2010
Soal kompetisi ipa tingkat kecamatan 2009 2010
 
Bab 6 Bioteknologi kelas 9G SMPN 264 Jakarta
Bab 6 Bioteknologi kelas 9G SMPN 264 JakartaBab 6 Bioteknologi kelas 9G SMPN 264 Jakarta
Bab 6 Bioteknologi kelas 9G SMPN 264 Jakarta
 
Soal tryout KLS IX (IPA FISIKA)
Soal tryout KLS IX (IPA FISIKA)Soal tryout KLS IX (IPA FISIKA)
Soal tryout KLS IX (IPA FISIKA)
 

Similar to Jva

Bank Program in JavaBelow is my code(havent finished, but it be .pdf
Bank Program in JavaBelow is my code(havent finished, but it be .pdfBank Program in JavaBelow is my code(havent finished, but it be .pdf
Bank Program in JavaBelow is my code(havent finished, but it be .pdf
izabellejaeden956
 
You are not setting any values for those variables(name, ID, interes.pdf
You are not setting any values for those variables(name, ID, interes.pdfYou are not setting any values for those variables(name, ID, interes.pdf
You are not setting any values for those variables(name, ID, interes.pdf
deepakangel
 
I need help creating a basic and simple Java program. Here is the ex.pdf
I need help creating a basic and simple Java program. Here is the ex.pdfI need help creating a basic and simple Java program. Here is the ex.pdf
I need help creating a basic and simple Java program. Here is the ex.pdf
rajeshjangid1865
 
Bank account in java
Bank account in javaBank account in java
Bank account in java
Programming Homework Help
 
Java programI made this Account.java below. Using the attached cod.pdf
Java programI made this Account.java below. Using the attached cod.pdfJava programI made this Account.java below. Using the attached cod.pdf
Java programI made this Account.java below. Using the attached cod.pdf
fathimafancy
 
programming for Calculator in java
programming for Calculator in javaprogramming for Calculator in java
programming for Calculator in java
One97 Communications Limited
 
IP project for class 12 cbse
IP project for class 12 cbseIP project for class 12 cbse
IP project for class 12 cbse
siddharthjha34
 
The java class Account that simultes the Account class.pdf
   The java class Account that simultes  the Account class.pdf   The java class Account that simultes  the Account class.pdf
The java class Account that simultes the Account class.pdf
akshay1213
 
Change to oop formatimport java.util.Scanner;import java.io.;.pdf
Change to oop formatimport java.util.Scanner;import java.io.;.pdfChange to oop formatimport java.util.Scanner;import java.io.;.pdf
Change to oop formatimport java.util.Scanner;import java.io.;.pdf
MAYANKBANSAL1981
 
public class InsufficientFundsException extends Exception{Insuffic.pdf
public class InsufficientFundsException extends Exception{Insuffic.pdfpublic class InsufficientFundsException extends Exception{Insuffic.pdf
public class InsufficientFundsException extends Exception{Insuffic.pdf
ankitcom
 
5 Rmi Print
5  Rmi Print5  Rmi Print
5 Rmi Print
varadasuren
 
Hi,I have updated the code as per your requirement. Highlighted th.pdf
Hi,I have updated the code as per your requirement. Highlighted th.pdfHi,I have updated the code as per your requirement. Highlighted th.pdf
Hi,I have updated the code as per your requirement. Highlighted th.pdf
annaindustries
 
Transaction Management Tool
Transaction Management ToolTransaction Management Tool
Transaction Management Tool
Peeyush Ranjan
 
Java 8 lambda expressions
Java 8 lambda expressionsJava 8 lambda expressions
Java 8 lambda expressions
Logan Chien
 
Project on Bank System .docx
Project on Bank System .docxProject on Bank System .docx
Project on Bank System .docx
AltafKhadim
 
Write a Java ProgramSolutionAnswer- Code- import java-io--- import jav.docx
Write a Java ProgramSolutionAnswer- Code- import java-io--- import jav.docxWrite a Java ProgramSolutionAnswer- Code- import java-io--- import jav.docx
Write a Java ProgramSolutionAnswer- Code- import java-io--- import jav.docx
lez31palka
 
Automatically Repairing Test Cases for Evolving Method Declarations
Automatically Repairing Test Cases for Evolving Method DeclarationsAutomatically Repairing Test Cases for Evolving Method Declarations
Automatically Repairing Test Cases for Evolving Method Declarations
ICSM 2010
 
Clojure workshop
Clojure workshopClojure workshop
Clojure workshop
Alf Kristian Støyle
 
C programs
C programsC programs
C programs
Vikram Nandini
 
Java Language.....pdf
Java Language.....pdfJava Language.....pdf
Java Language.....pdf
badshetoms
 

Similar to Jva (20)

Bank Program in JavaBelow is my code(havent finished, but it be .pdf
Bank Program in JavaBelow is my code(havent finished, but it be .pdfBank Program in JavaBelow is my code(havent finished, but it be .pdf
Bank Program in JavaBelow is my code(havent finished, but it be .pdf
 
You are not setting any values for those variables(name, ID, interes.pdf
You are not setting any values for those variables(name, ID, interes.pdfYou are not setting any values for those variables(name, ID, interes.pdf
You are not setting any values for those variables(name, ID, interes.pdf
 
I need help creating a basic and simple Java program. Here is the ex.pdf
I need help creating a basic and simple Java program. Here is the ex.pdfI need help creating a basic and simple Java program. Here is the ex.pdf
I need help creating a basic and simple Java program. Here is the ex.pdf
 
Bank account in java
Bank account in javaBank account in java
Bank account in java
 
Java programI made this Account.java below. Using the attached cod.pdf
Java programI made this Account.java below. Using the attached cod.pdfJava programI made this Account.java below. Using the attached cod.pdf
Java programI made this Account.java below. Using the attached cod.pdf
 
programming for Calculator in java
programming for Calculator in javaprogramming for Calculator in java
programming for Calculator in java
 
IP project for class 12 cbse
IP project for class 12 cbseIP project for class 12 cbse
IP project for class 12 cbse
 
The java class Account that simultes the Account class.pdf
   The java class Account that simultes  the Account class.pdf   The java class Account that simultes  the Account class.pdf
The java class Account that simultes the Account class.pdf
 
Change to oop formatimport java.util.Scanner;import java.io.;.pdf
Change to oop formatimport java.util.Scanner;import java.io.;.pdfChange to oop formatimport java.util.Scanner;import java.io.;.pdf
Change to oop formatimport java.util.Scanner;import java.io.;.pdf
 
public class InsufficientFundsException extends Exception{Insuffic.pdf
public class InsufficientFundsException extends Exception{Insuffic.pdfpublic class InsufficientFundsException extends Exception{Insuffic.pdf
public class InsufficientFundsException extends Exception{Insuffic.pdf
 
5 Rmi Print
5  Rmi Print5  Rmi Print
5 Rmi Print
 
Hi,I have updated the code as per your requirement. Highlighted th.pdf
Hi,I have updated the code as per your requirement. Highlighted th.pdfHi,I have updated the code as per your requirement. Highlighted th.pdf
Hi,I have updated the code as per your requirement. Highlighted th.pdf
 
Transaction Management Tool
Transaction Management ToolTransaction Management Tool
Transaction Management Tool
 
Java 8 lambda expressions
Java 8 lambda expressionsJava 8 lambda expressions
Java 8 lambda expressions
 
Project on Bank System .docx
Project on Bank System .docxProject on Bank System .docx
Project on Bank System .docx
 
Write a Java ProgramSolutionAnswer- Code- import java-io--- import jav.docx
Write a Java ProgramSolutionAnswer- Code- import java-io--- import jav.docxWrite a Java ProgramSolutionAnswer- Code- import java-io--- import jav.docx
Write a Java ProgramSolutionAnswer- Code- import java-io--- import jav.docx
 
Automatically Repairing Test Cases for Evolving Method Declarations
Automatically Repairing Test Cases for Evolving Method DeclarationsAutomatically Repairing Test Cases for Evolving Method Declarations
Automatically Repairing Test Cases for Evolving Method Declarations
 
Clojure workshop
Clojure workshopClojure workshop
Clojure workshop
 
C programs
C programsC programs
C programs
 
Java Language.....pdf
Java Language.....pdfJava Language.....pdf
Java Language.....pdf
 

Recently uploaded

คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
สมใจ จันสุกสี
 
Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47
MysoreMuleSoftMeetup
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
Jean Carlos Nunes Paixão
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
WaniBasim
 
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) CurriculumPhilippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
MJDuyan
 
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem studentsRHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
Himanshu Rai
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
Nicholas Montgomery
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
adhitya5119
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
Nguyen Thanh Tu Collection
 
Walmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdfWalmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdf
TechSoup
 
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching AptitudeUGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
S. Raj Kumar
 
How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17
Celine George
 
BBR 2024 Summer Sessions Interview Training
BBR  2024 Summer Sessions Interview TrainingBBR  2024 Summer Sessions Interview Training
BBR 2024 Summer Sessions Interview Training
Katrina Pritchard
 
How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience
Wahiba Chair Training & Consulting
 
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptxNEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
iammrhaywood
 
How to deliver Powerpoint Presentations.pptx
How to deliver Powerpoint  Presentations.pptxHow to deliver Powerpoint  Presentations.pptx
How to deliver Powerpoint Presentations.pptx
HajraNaeem15
 
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptxChapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Denish Jangid
 
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
Nguyen Thanh Tu Collection
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
mulvey2
 
math operations ued in python and all used
math operations ued in python and all usedmath operations ued in python and all used
math operations ued in python and all used
ssuser13ffe4
 

Recently uploaded (20)

คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
 
Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
 
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) CurriculumPhilippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
 
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem studentsRHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
 
Walmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdfWalmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdf
 
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching AptitudeUGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
 
How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17
 
BBR 2024 Summer Sessions Interview Training
BBR  2024 Summer Sessions Interview TrainingBBR  2024 Summer Sessions Interview Training
BBR 2024 Summer Sessions Interview Training
 
How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience
 
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptxNEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
 
How to deliver Powerpoint Presentations.pptx
How to deliver Powerpoint  Presentations.pptxHow to deliver Powerpoint  Presentations.pptx
How to deliver Powerpoint Presentations.pptx
 
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptxChapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptx
 
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
 
math operations ued in python and all used
math operations ued in python and all usedmath operations ued in python and all used
math operations ued in python and all used
 

Jva

  • 1. import java.util.Scanner; public class AccountFrame { public static void main(String args[]) { Account account1 = new Account (50.00); Account account2 = new Account(-7.53); System.out.printf("account1 balance:$%.2fn".account1.getBalance()); System.out.printf("account2 balance:$ %.2fnn".account2.getBalance()); Scanner input= new Scanner(System.in); double depositAmount; System.out.printf("enter deposit amount for account1:"); depositAmount = input.nextDouble(); System.out.printf("nadding %.2f to account1 balancenn".depositAmount); account1.credit(depositAmount); System.out.printf("account1 balance: $ %.2fn".account1.getBalance()); System.out.printf("account2 balance: $ %.2fnn".account2.getBalance()); System.out.printf("enter deposit amount for account2:"); depositAmount =input.nextDouble(); System.out.printf("nadding %.2f to account2 balancenn".depositAmount); account2.credit(depositAmount); System.out.printf("account1 balance: $ %.2fn".account1.getBalance()); System.out.printf("account2 balance: $ %.2fn".account2.getBalance()); } }