Professional Documents
Culture Documents
Pabroa 03-NO.1 DeparmentCustomerData
Pabroa 03-NO.1 DeparmentCustomerData
Pabroa 03-NO.1 DeparmentCustomerData
BSIT – 2 (Returnee)
JAVA CODE
package pabroa_departmentStoreCustomer;
import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Scanner;
import java.text.DecimalFormat;
The program should input all of these facts, calculate the new balance ( =
beginning balance + charges - credits )
and determine if the new balance exceeds the customer's credit limit. For
those customers whose credit limit
is insufficient for the new balance, the program should display the customer's
account number, credit limit,
new balance and the message "Credit limit exceeded!"
file_process.input();
}
}
class CustomerAccount {
if (isCreditLimit_exceed()) {
creditLimit_text = "\nCredit Limit Exceeded!";
}
class FileProcess {
customerData_process(cust_acct);
}
try {
out_write = new PrintWriter(new BufferedWriter(new
FileWriter("customer_info.txt", true)));
out_write.println("\n" +cust_acct.toString());
} catch (IOException e) {
e.printStackTrace();
}finally {
if(out_write != null){
out_write.close();
}
}
}
}
INPUT:
OUTPUT: