6 import java.text.DecimalFormat; 7 import java.util.Scanner; 8. 49 } 51 public class exampleFile 9 class Account public static void main(String args[]) 10 { 11 12 13 14 15 16 17 18 53 54 public int id; public double balance; Account[] account=new Account[10]; for (int i=0; i<10; i++) { account[i]=new Account(i, 100); 55 public Account() 57 58 59 60 61 62 63 64 id=0; balance=0; while (true) { Scanner s=new Scanner(Stem.int); System.out.println("Enter your account ID: "); int id=s.nextInt(); while (id>10)|id<0)) { System.out.println("Please try again. "); id=s.nextInt(); 19 20 21 22 public Account (int a, double b) { 23 24 25 26 27 28 29 65 id=a; balance=b; 68 69 70 public double getBalance() while(true) { System.out.println("\nWelcome!!!"); System.out.println("1: Current balance"); System.out.println("2: Withdraw"); System.out.println("3: Deposit"); System.out.println ("4: Exit"); int choice=s.nextInt(); 71 { 30 31 32 33 34 35 72 return balance; 73 74 75 76 public void deposit(double a) 77 78 { 36 37 38 39 40 41 42 43 44 45 46 balance=balance+a; 79 if(choice==1) { System.out.println("Your current balance: $"+account[id].getBalance ()); public void withdraw(double a) 82 83 84 85 86 87 if(a<=balance) { balance=balance-a; else if (choice==2) { System.out.print("Enter the amount to deposit: "); double deposit=s.nextDouble(); else { System.out.println("Not enough money! Please reach out to your banking institution."); account[id].deposit(deposit); 88 89 90 91 else if(choice==3) { System.out.print("Enter the amount to withdraw: "); double withdraw=s.nextDouble(); account[id].withdraw(withdraw); 92 93 94 95 96 else if(choice==4) { System.out.println ("Logging out..."); System.out.print("Enter your ID: int fid=s.nextInt(); while (fid!=id) { System.out.print("Please try again: "); id.s.nextInt(); 97 98 99 100 "); 101 102 103 104 105 106 107 108 System.out.println ("Successfully logged out. Thank you for banking with Longitude Banking."); 109 110 111 } 112 5555555 699 6777 777 777 7 00

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter2: Using Data
Section: Chapter Questions
Problem 14RQ
icon
Related questions
Question
100%

hello! I keep getting the error "Check class headers... parsing individual files failed!" but I am not sure I am good at classes enough yet to know what that means or how to fix it. Can you help?

6 import java.text.DecimalFormat;
7 import java.util.Scanner;
8.
49 }
51 public class exampleFile
9 class Account
public static void main(String args[])
10 {
11
12
13
14
15
16
17
18
53
54
public int id;
public double balance;
Account[] account=new Account[10];
for (int i=0; i<10; i++)
{
account[i]=new Account(i, 100);
55
public Account()
57
58
59
60
61
62
63
64
id=0;
balance=0;
while (true)
{
Scanner s=new Scanner(Stem.int);
System.out.println("Enter your account ID: ");
int id=s.nextInt();
while (id>10)|id<0))
{
System.out.println("Please try again. ");
id=s.nextInt();
19
20
21
22
public Account (int a, double b)
{
23
24
25
26
27
28
29
65
id=a;
balance=b;
68
69
70
public double getBalance()
while(true)
{
System.out.println("\nWelcome!!!");
System.out.println("1: Current balance");
System.out.println("2: Withdraw");
System.out.println("3: Deposit");
System.out.println ("4: Exit");
int choice=s.nextInt();
71
{
30
31
32
33
34
35
72
return balance;
73
74
75
76
public void deposit(double a)
77
78
{
36
37
38
39
40
41
42
43
44
45
46
balance=balance+a;
79
if(choice==1)
{
System.out.println("Your current balance: $"+account[id].getBalance ());
public void withdraw(double a)
82
83
84
85
86
87
if(a<=balance)
{
balance=balance-a;
else if (choice==2)
{
System.out.print("Enter the amount to deposit: ");
double deposit=s.nextDouble();
else
{
System.out.println("Not enough money! Please reach out to your banking institution.");
account[id].deposit(deposit);
88
89
90
91
else if(choice==3)
{
System.out.print("Enter the amount to withdraw: ");
double withdraw=s.nextDouble();
account[id].withdraw(withdraw);
92
93
94
95
96
else if(choice==4)
{
System.out.println ("Logging out...");
System.out.print("Enter your ID:
int fid=s.nextInt();
while (fid!=id)
{
System.out.print("Please try again: ");
id.s.nextInt();
97
98
99
100
");
101
102
103
104
105
106
107
108
System.out.println ("Successfully logged out. Thank you for banking with Longitude Banking.");
109
110
111 }
112
5555555
699 6777 777 777 7 00
Transcribed Image Text:6 import java.text.DecimalFormat; 7 import java.util.Scanner; 8. 49 } 51 public class exampleFile 9 class Account public static void main(String args[]) 10 { 11 12 13 14 15 16 17 18 53 54 public int id; public double balance; Account[] account=new Account[10]; for (int i=0; i<10; i++) { account[i]=new Account(i, 100); 55 public Account() 57 58 59 60 61 62 63 64 id=0; balance=0; while (true) { Scanner s=new Scanner(Stem.int); System.out.println("Enter your account ID: "); int id=s.nextInt(); while (id>10)|id<0)) { System.out.println("Please try again. "); id=s.nextInt(); 19 20 21 22 public Account (int a, double b) { 23 24 25 26 27 28 29 65 id=a; balance=b; 68 69 70 public double getBalance() while(true) { System.out.println("\nWelcome!!!"); System.out.println("1: Current balance"); System.out.println("2: Withdraw"); System.out.println("3: Deposit"); System.out.println ("4: Exit"); int choice=s.nextInt(); 71 { 30 31 32 33 34 35 72 return balance; 73 74 75 76 public void deposit(double a) 77 78 { 36 37 38 39 40 41 42 43 44 45 46 balance=balance+a; 79 if(choice==1) { System.out.println("Your current balance: $"+account[id].getBalance ()); public void withdraw(double a) 82 83 84 85 86 87 if(a<=balance) { balance=balance-a; else if (choice==2) { System.out.print("Enter the amount to deposit: "); double deposit=s.nextDouble(); else { System.out.println("Not enough money! Please reach out to your banking institution."); account[id].deposit(deposit); 88 89 90 91 else if(choice==3) { System.out.print("Enter the amount to withdraw: "); double withdraw=s.nextDouble(); account[id].withdraw(withdraw); 92 93 94 95 96 else if(choice==4) { System.out.println ("Logging out..."); System.out.print("Enter your ID: int fid=s.nextInt(); while (fid!=id) { System.out.print("Please try again: "); id.s.nextInt(); 97 98 99 100 "); 101 102 103 104 105 106 107 108 System.out.println ("Successfully logged out. Thank you for banking with Longitude Banking."); 109 110 111 } 112 5555555 699 6777 777 777 7 00
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Windows
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT