Professional Documents
Culture Documents
Laboratory Exercise 1
Review of Java Programming
Objectives:
At the end of the exercise, the students should be able to:
Activities:
1. A bank in your town updates its customers’ accounts at the end of each month. The bank
offers two types of accounts: savings and checking. Every customer must maintain a
minimum balance of Php 10000 and Php 50000 for savings and checking accounts
respectively. If a customer’s balance falls below the minimum balance, there is a service
charge of Php 100.00 for savings accounts and Php 500.00 for checking accounts. If the
balance at the end of the month is at least the minimum balance, the account receives
interest as follows:
Write a program that reads a customer’s account number (int type), account type (char
type; s or S for savings, c or C for checking, and treat any other character as an error) and
current balance. The program should then output the account number, account type,
current balance, interest or service charge and the new balance.
Use methods in your program and this should be repeated unless no other input to process.
Sample:
Account No Account Type Current Balance Interest Service Charge New Balance
12345 Saving 26750.00 802.50 27552.50
Account No Account Type Current Balance Interest Service Charge New Balance
22345 Checking 45620.00 500.00 45120.00
Program Terminated
Submission Requirements:
Students must adhere to the following requirements when submitting the laboratory
exercises.
1. Every program should follow this File Header requirement. The first lines of the program
to be submitted should include a comment with the following information and format:
2. Naming Convention
a. Program Name or class name should be named following this notation :
IT2X_Group#_Lab#A/B where X is your section and # is the group and laboratory
exercise # set A/B. For example, if you belong to BSIT-2A, group #1 and this is
laboratory exercise #1 set A, the program name or class name is
IT2A_Group1_Lab1A For BSCS-2A class, use CS2A_Group1_Lab1A
b. For the folder name : 2X-Group#-Lab#A/B and following the example above, the
folder name is 2A-Group1-Lab1A and for BSCS-2A use 2CS-Group1-Lab1A
3. Test your program several times to make sure it is running correctly, and it is the
program you will submit. Only the source program needs to be submitted. Place it in
your folder, compress and submit. The result should be
2A-Group1-Lab1A.zip
4. Submit the zipped file using the “Submission Form – Data Structures” intended for your
class. Link will be sent in your respective GCs. Only one submission per group is
required.