1+ package t .Accounts ;
2+
3+ import t .ATMFunctions .Console ;
4+
5+
6+ public abstract class Accounts {
7+
8+ private String createAccount () {
9+
10+ int userInput = Console .getIntInput ("Please input what type of account you'd like to create.\n " +
11+ "Please enter '1' for checking account, enter '2' for savings account and enter'3' for an investment account." );
12+
13+ boolean terminator = false ;
14+
15+ while (terminator = true ) {
16+ switch (userInput ) {
17+ case 1 :
18+ //create a checking account
19+ break ;
20+ case 2 :
21+ //create a savings account
22+ break ;
23+ case 3 :
24+ //create an investment account
25+ default :
26+ System .out .println ("Please enter a correct response.\n " );
27+ userInput = Console .getIntInput ("Please enter '1' for checking account, enter '2' for savings account and enter'3' for an investment account." );
28+ continue ;
29+ }
30+ terminator = false ;
31+ }
32+ return "" ; //what type of account they created
33+ }
34+
35+ private String deleteAccount () {
36+ int userInput = Console .getIntInput ("Please input what type of account you'd like to delete.\n " +
37+ "Please enter '1' for checking account, enter '2' for savings account and enter'3' for an investment account." );
38+
39+ boolean terminator = false ;
40+
41+ while (terminator = true ) {
42+ switch (userInput ) {
43+ case 1 :
44+ //delete a checking account
45+ break ;
46+ case 2 :
47+ //delete a savings account
48+ break ;
49+ case 3 :
50+ //delete an investment account
51+ default :
52+ System .out .println ("Please enter a correct response.\n " );
53+ userInput = Console .getIntInput ("Please enter '1' for checking account, enter '2' for savings account and enter'3' for an investment account." );
54+ continue ;
55+ }
56+ terminator = false ;
57+ }
58+ return "" ;//what account they just delete
59+ }
60+
61+ private String viewAccount () {
62+ int userInput = Console .getIntInput ("Please input what type of account you'd like to view.\n " +
63+ "Please enter '1' for checking account, enter '2' for savings account and enter'3' for an investment account." );
64+
65+ boolean terminator = false ;
66+
67+ while (terminator = true ) {
68+ switch (userInput ) {
69+ case 1 :
70+ //view a checking account
71+ break ;
72+ case 2 :
73+ //view a savings account
74+ break ;
75+ case 3 :
76+ //view an investment account
77+ default :
78+ System .out .println ("Please enter a correct response.\n " );
79+ userInput = Console .getIntInput ("Please enter '1' for checking account, enter '2' for savings account and enter'3' for an investment account." );
80+ continue ;
81+ }
82+ terminator = false ;
83+ }
84+ return "" ;//the info for the account they chose to view
85+ }
86+
87+ private void transferBetweenAccounts () {
88+ int userInput = Console .getIntInput ("Please input which accounts that you'd like to transfer money between.\n " +
89+ "Please indicate what account you'd like to transfer FROM by\n " +
90+ " entering '1' for checking account, entering '2' for savings account and entering'3' for an investment account." );
91+
92+ boolean terminator = false ;
93+
94+ while (terminator = true ) {
95+ switch (userInput ) {
96+ case 1 :
97+ //view checking account balance
98+ break ;
99+ case 2 :
100+ //view savings account balance
101+ break ;
102+ case 3 :
103+ //view investment account balance
104+ default :
105+ System .out .println ("Please enter a correct response.\n " );
106+ userInput = Console .getIntInput ("Please enter '1' for checking account, enter '2' for savings account and enter'3' for an investment account." );
107+ continue ;
108+ }
109+ terminator = false ;
110+ }
111+
112+ userInput += Console .getIntInput ("Please indicate what account you'd like to transfer TO by\n " +
113+ " entering '1' for checking account, entering '2' for savings account and entering'3' for an investment account." );
114+
115+ while (terminator = true ) {
116+ switch (userInput ) {
117+ case 1 :
118+ //view checking account balance
119+ break ;
120+ case 2 :
121+ //view savings account balance
122+ break ;
123+ case 3 :
124+ //view investment account balance
125+ default :
126+ System .out .println ("Please enter a correct response.\n " );
127+ userInput = Console .getIntInput ("Please enter '1' for checking account, enter '2' for savings account and enter'3' for an investment account." );
128+ continue ;
129+ }
130+ terminator = false ;
131+
132+ //call view method to show user account information for both accounts
133+
134+ int amountToTransfer = Console .getIntInput ("How much money would you like to transfer between accounts?" );
135+
136+ //transfer the desired amount between specified accounts
137+
138+ }
139+ }
140+ private String depositMoney (){
141+
142+ int userInput = Console .getIntInput ("Please indicate which account you'd like to deposit money into.\n " +
143+ "Please enter '1' for checking account, enter '2' for savings account and enter'3' for an investment account." );
144+
145+ boolean terminator = false ;
146+
147+ while (terminator = true ) {
148+ switch (userInput ) {
149+ case 1 :
150+ //view checking account balance
151+ break ;
152+ case 2 :
153+ //view savings account nalance
154+ break ;
155+ case 3 :
156+ //view investment account balance
157+ default :
158+ System .out .println ("Please enter a correct response.\n " );
159+ userInput = Console .getIntInput ("Please enter '1' for checking account, enter '2' for savings account and enter'3' for an investment account." );
160+ continue ;
161+ }
162+ terminator = false ;
163+
164+ int amountToDeposit = Console .getIntInput ("How much money would you like to deposit?" );
165+
166+ //call method to deposit indicated amount into indicated account
167+ }
168+ return "" ;//new account balance
169+ }
170+
171+ private String withDrawMoney (){
172+
173+ int userInput = Console .getIntInput ("Please indicate which account you'd like to withdraw money from.\n " +
174+ "Please enter '1' for checking account, enter '2' for savings account and enter'3' for an investment account." );
175+
176+ boolean terminator = false ;
177+
178+ while (terminator = true ) {
179+ switch (userInput ) {
180+ case 1 :
181+ //view checking account balance
182+ break ;
183+ case 2 :
184+ //view savings account nalance
185+ break ;
186+ case 3 :
187+ //view investment account balance
188+ default :
189+ System .out .println ("Please enter a correct response.\n " );
190+ userInput = Console .getIntInput ("Please enter '1' for checking account, enter '2' for savings account and enter'3' for an investment account." );
191+ continue ;
192+ }
193+ terminator = false ;
194+
195+ int amountToDeposit = Console .getIntInput ("How much money would you like to withdraw?\n " +
196+ "All withdraw requests must be in $20 and no more than $600." );
197+
198+ //call method to withdraw indicated amount from indicated account
199+ }
200+ return "" ;//new account balance
201+ }
202+
203+ private void interestedAccrued () {
204+
205+ int userInput = Console .getIntInput ("Please indicate which account you'd like to view accrued interest.\n " +
206+ "Please enter '1' for checking account, enter '2' for savings account and enter'3' for an investment account." );
207+
208+ boolean terminator = false ;
209+
210+ while (terminator = true ) {
211+ switch (userInput ) {
212+ case 1 :
213+ //view checking account interest
214+ break ;
215+ case 2 :
216+ //view savings account interest
217+ break ;
218+ case 3 :
219+ //view investment account insterest
220+ default :
221+ System .out .println ("Please enter a correct response.\n " );
222+ userInput = Console .getIntInput ("Please enter '1' for checking account, enter '2' for savings account and enter'3' for an investment account." );
223+ continue ;
224+ }
225+ terminator = false ;
226+
227+ }
228+ }
229+ }
0 commit comments