0% found this document useful (0 votes)
9 views

CSE101 Assignment 02

Hshhwhajajjajjq

Uploaded by

berkc766
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

CSE101 Assignment 02

Hshhwhajajjajjq

Uploaded by

berkc766
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

CSE101T Programming Assignment 2 Page 1 of 3

Due:
Thursday, 24-October-2024 by 23:59

Deliverables:
The following Java file should be submitted to MS Teams by the due date and time
specified above. Submissions received after the deadline will be subject to the late
policy described in the syllabus.
o Assignment2_{StudentNumber}.java (NOTE: Do not include the curly braces in
your filename)

Specifications:

Overview: You will continue your program this week to maintain the account balance for a
user of an ATM. Do not forget your headers with @author and @date information. This
program will be expanded in future weeks, so be sure you understand the concepts covered
in this program.

Requirements: Write a program that will simulate the user interface for an ATM. It will
allow the user to select one of five (5) options:
1. Display Balance, Withdraw Money, Deposit Money should function in the same
way as Assignment 1 except that now withdrawing money will show the different
amounts of various bills the user will receive.
2. Pay a bill
a. Gives options for the bill the user wants to pay (Electricity, Water,
Internet)
b. User selects the option desired
c. The bill amount will be randomly assigned (from 0.01 to 100.0)
d. If the user has enough funds to pay the bill, confirm payment.
e. If the user does not have enough funds, display an appropriate message
and return to the main menu
3. Exit

To facilitate the execution of this program, you will write (at minimum) the following
methods:
1. main()
a. A method to run the atm program
b. It will ask the user for three parameters representing the name, surname,
and starting balance for the customer.
c. It will adjust the name so that the first character is uppercase and all other
characters are lowercase
d. It will adjust the surname to be all uppercase letters
e. It will then run according to the description until the user types “5” or an
invalid value (display a message before exiting for invalid values)

CSE 101T|Fall 2024 1


CSE101T Programming Assignment 2 Page 2 of 3

Design:
When run, your program should ask the user for his/her name, surname and beginning
balance, then greet the user and process their requests. An example is given below:

Normal Usage Example 1:

Normal Usage Example 2:

CSE 101T|Fall 2024 2


CSE101T Programming Assignment 2 Page 3 of 3

If the user enters invalid values, the program should display a message saying that the
value is not acceptable. If an invalid starting balance is entered, the program should
continue requesting a balance until a valid value is given. If an invalid deposit or
withdrawal amount is entered, the program should return to the main menu. If an invalid
menu option is entered, the program should display a message and exit. Examples
shown:

Code: Create variables for the various values entered by the user and assign it using the
Scanner object. As a user enters valid values for depositing and withdrawing money,
update the balance variable accordingly.

Test: You are responsible for testing your program. It is important to not rely solely on
the examples presented in this Project description.

Grading:
MS Teams Submission: You can submit multiple times, however, we will only grade the last
version that you submitted.

NOTE: If you use System.exit() in your code, you will automatically receive 0 points for this
assignment.

CSE 101T|Fall 2024 3

You might also like