Skip to content

Commit ab57a9d

Browse files
committed
remove src folder from file structure
1 parent 74fb3f1 commit ab57a9d

File tree

927 files changed

+1596
-1495
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

927 files changed

+1596
-1495
lines changed
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

src/ch_08/Exercise08_36.java ch_08/Exercise08_36.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public static void main(String[] args) {
8989

9090
}
9191
if (result) {
92-
OUTTER:
92+
OUTER:
9393
for (int column = 0; column < numRows; column++) {
9494
if (column > 0) {
9595
colTracker.clear();
@@ -100,7 +100,7 @@ public static void main(String[] args) {
100100
if (colTracker.size() > 0) {
101101
if (colTracker.contains(value)) {
102102
notALSq();
103-
break OUTTER;
103+
break OUTER;
104104
}
105105
}
106106
colTracker.add(value);
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

src/ch_09/exercise09_06/Exercise09_06.java ch_09/exercise09_06/Exercise09_06.java

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package ch_09.exercise09_06;
22

3-
import java.util.Arrays;
43
import java.util.Random;
54

65
/**
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line numberDiff line numberDiff line change
@@ -1,99 +1,99 @@
1-
package ch_10;
2-
3-
import java.util.Scanner;
4-
5-
import ch_09.exercise09_07.Account;
6-
7-
/**
8-
* 10.7 (Game: ATM machine) Use the Account class created in
9-
* Programming Exercise 9.7 to simulate an ATM machine.
10-
* Create ten accounts in an array with id 0, 1, . . . , 9,
11-
* and initial balance $100. The system prompts the user to
12-
* enter an id. If the id is entered incorrectly, ask the user
13-
* to enter a correct id. Once an id is accepted, the main menu
14-
* is displayed as shown in the sample run. You can enter a choice
15-
* 1 for viewing the current balance, 2 for withdrawing money, 3 for
16-
* depositing money, and 4 for exiting the main menu. Once you exit,
17-
* the system will prompt for an id again. Thus, once the system
18-
* starts, it will not stop.
19-
*
20-
* @author Harry D.
21-
*/
22-
public class Exercise10_07 {
23-
public static void main(String[] args) {
24-
25-
Scanner input = new Scanner(System.in);
26-
27-
Account[] atmAccounts = new Account[10];
28-
29-
for (int i = 0; i < atmAccounts.length; i++) {
30-
31-
atmAccounts[i] = new Account(i, 100.00);
32-
33-
}
34-
LOOP:
35-
for (; ; ) { // Enter 1234 to end the program
36-
37-
System.out.print("Please enter an account ID#: ");
38-
39-
40-
int idOfAcc = input.nextInt();
41-
if (idOfAcc == 1234) {
42-
break;
43-
}
44-
45-
while (idOfAcc < 0 | idOfAcc > 9) {
46-
47-
System.out.println("Incorrect ID# please enter a correct ID# ");
48-
49-
idOfAcc = input.nextInt();
50-
if (idOfAcc == 1234) {
51-
break LOOP;
52-
}
53-
}
54-
55-
56-
int userInput = 0;
57-
58-
while (userInput != 4) {
59-
60-
61-
System.out.println("Main Menu");
62-
System.out.println("1: Check Balance");
63-
System.out.println("2: Withdraw");
64-
System.out.println("3: Deposit");
65-
System.out.println("4: Exit");
66-
System.out.print("Enter a choice now:");
67-
68-
userInput = input.nextInt();
69-
executeCommand(userInput, idOfAcc, input, atmAccounts);
70-
71-
}
72-
}
73-
}
74-
75-
public static void executeCommand(int userCommand, int accId,
76-
Scanner j, Account[] arr) {
77-
78-
switch (userCommand) {
79-
80-
case 1:
81-
System.out.printf("The balance in account " + accId + " is $%.2f \n",
82-
arr[accId].getBalance());
83-
break;
84-
85-
case 2:
86-
System.out.print("Enter the amount you want to withdraw:");
87-
arr[accId].withdraw(j.nextDouble());
88-
break;
89-
90-
case 3:
91-
System.out.print("Enter the amount you you want to deposit:");
92-
arr[accId].deposit(j.nextDouble());
93-
94-
95-
}
96-
97-
}
98-
99-
}
1+
package ch_10;
2+
3+
import java.util.Scanner;
4+
5+
import ch_09.exercise09_07.Account;
6+
7+
/**
8+
* 10.7 (Game: ATM machine) Use the Account class created in
9+
* Programming Exercise 9.7 to simulate an ATM machine.
10+
* Create ten accounts in an array with id 0, 1, . . . , 9,
11+
* and initial balance $100. The system prompts the user to
12+
* enter an id. If the id is entered incorrectly, ask the user
13+
* to enter a correct id. Once an id is accepted, the main menu
14+
* is displayed as shown in the sample run. You can enter a choice
15+
* 1 for viewing the current balance, 2 for withdrawing money, 3 for
16+
* depositing money, and 4 for exiting the main menu. Once you exit,
17+
* the system will prompt for an id again. Thus, once the system
18+
* starts, it will not stop.
19+
*
20+
* @author Harry D.
21+
*/
22+
public class Exercise10_07 {
23+
public static void main(String[] args) {
24+
25+
Scanner input = new Scanner(System.in);
26+
27+
Account[] atmAccounts = new Account[10];
28+
29+
for (int i = 0; i < atmAccounts.length; i++) {
30+
31+
atmAccounts[i] = new Account(i, 100.00);
32+
33+
}
34+
LOOP:
35+
for (; ; ) { // Enter 1234 to end the program
36+
37+
System.out.print("Please enter an account ID#: ");
38+
39+
40+
int idOfAcc = input.nextInt();
41+
if (idOfAcc == 1234) {
42+
break;
43+
}
44+
45+
while (idOfAcc < 0 | idOfAcc > 9) {
46+
47+
System.out.println("Incorrect ID# please enter a correct ID# ");
48+
49+
idOfAcc = input.nextInt();
50+
if (idOfAcc == 1234) {
51+
break LOOP;
52+
}
53+
}
54+
55+
56+
int userInput = 0;
57+
58+
while (userInput != 4) {
59+
60+
61+
System.out.println("Main Menu");
62+
System.out.println("1: Check Balance");
63+
System.out.println("2: Withdraw");
64+
System.out.println("3: Deposit");
65+
System.out.println("4: Exit");
66+
System.out.print("Enter a choice now:");
67+
68+
userInput = input.nextInt();
69+
executeCommand(userInput, idOfAcc, input, atmAccounts);
70+
71+
}
72+
}
73+
}
74+
75+
public static void executeCommand(int userCommand, int accId,
76+
Scanner j, Account[] arr) {
77+
78+
switch (userCommand) {
79+
80+
case 1:
81+
System.out.printf("The balance in account " + accId + " is $%.2f \n",
82+
arr[accId].getBalance());
83+
break;
84+
85+
case 2:
86+
System.out.print("Enter the amount you want to withdraw:");
87+
arr[accId].withdraw(j.nextDouble());
88+
break;
89+
90+
case 3:
91+
System.out.print("Enter the amount you you want to deposit:");
92+
arr[accId].deposit(j.nextDouble());
93+
94+
95+
}
96+
97+
}
98+
99+
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)