SlideShare a Scribd company logo
1 of 42
Lab 1/Banking System/build.xml
Builds, tests, and runs the project Banking System.
Lab 1/Banking System/build/classes/.netbeans_automatic_build
Lab 1/Banking
System/build/classes/.netbeans_update_resources
Lab 1/Banking
System/build/classes/banking/BankingSystem.classpackage
banking;
publicsynchronizedclass BankingSystem {
public void BankingSystem();
publicstatic void main(String[]);
}
Lab 1/Banking
System/build/classes/banking/database/AccountDA.classpackag
e banking.database;
publicsynchronizedclass AccountDA {
publicstatic java.util.ArrayList accounts;
public void AccountDA();
publicstatic void add(banking.domain.Account);
publicstatic java.util.ArrayList getCustomerAccounts(int);
publicstatic void initialize();
static void <clinit>();
}
Lab 1/Banking
System/build/classes/banking/database/CustomerDA.classpacka
ge banking.database;
publicsynchronizedclass CustomerDA {
privatestatic java.util.ArrayList customers;
public void CustomerDA();
publicstatic void add(banking.domain.Customer);
publicstatic java.util.ArrayList getCustomers();
publicstatic void inititialize();
static void <clinit>();
}
Lab 1/Banking
System/build/classes/banking/database/TransactionDA.classpac
kage banking.database;
publicsynchronizedclass TransactionDA {
privatestatic java.util.ArrayList transactions;
public void TransactionDA();
publicstatic void add(banking.domain.Transaction);
publicstatic java.util.ArrayList getAccountTransactions(int);
publicstatic void initialize();
static void <clinit>();
}
Lab 1/Banking
System/build/classes/banking/domain/Account.classpackage
banking.domain;
publicabstractsynchronizedclass Account {
private int accountNumber;
private int customerID;
private String accountName;
private java.util.Date dateOpened;
public void Account();
public void add();
public String getAccountName();
public int getAccountNumber();
publicstatic java.util.ArrayList getCustomerAccounts(int);
public int getCustomerID();
public java.util.Date getDateOpened();
public java.util.ArrayList getTransactions();
publicstatic void initialize();
public void setAccountName(String);
public void setAccountNumber(int);
public void setCustomerID(int);
public void setDateOpened(java.util.Date);
public String toString();
}
Lab 1/Banking
System/build/classes/banking/domain/Asset.classpackage
banking.domain;
publicsynchronizedclass Asset extends Account {
public void Asset();
}
Lab 1/Banking
System/build/classes/banking/domain/Customer.classpackage
banking.domain;
publicsynchronizedclass Customer {
private int customerID;
private String name;
private long phoneNumber;
public void Customer();
public void add();
publicstatic void add(Customer);
public java.util.ArrayList getAccounts();
public int getCustomerID();
publicstatic java.util.ArrayList getCustomers();
public String getName();
public long getPhoneNumber();
public void setCustomerID(int);
public void setName(String);
public void setPhoneNumber(long);
publicstatic void initialize();
public String toString();
}
Lab 1/Banking
System/build/classes/banking/domain/Liability.classpackage
banking.domain;
publicsynchronizedclass Liability extends Account {
public void Liability();
}
Lab 1/Banking
System/build/classes/banking/domain/Transaction.classpackage
banking.domain;
publicsynchronizedclass Transaction {
private double amount;
private int transactionID;
private java.util.Date transactionDate;
private int accountNumber;
private String description;
public void Transaction();
public void add();
public int getAccountNumber();
public double getAmount();
publicstatic java.util.ArrayList getAccountTransactions(int);
public String getDescription();
public java.util.Date getTransactionDate();
public int getTransactionID();
publicstatic void initialize();
public void setAccountNumber(int);
public void setAmount(double);
public void setDescription(String);
public void setTransactionDate(java.util.Date);
public void setTransactionID(int);
public String toString();
}
Lab 1/Banking System/manifest.mf
Manifest-Version: 1.0
X-COMMENT: Main-Class will be added automatically by build
Lab 1/Banking System/nbproject/build-impl.xml
Must set src.dir
Must set test.src.dir
Must set build.dir
Must set dist.dir
Must set build.classes.dir
Must set dist.javadoc.dir
Must set build.test.classes.dir
Must set build.test.results.dir
Must set build.classes.excludes
Must set dist.jar
Must set javac.includes
No tests executed.
Must set JVM to use for profiling in profiler.info.jvm
Must set profiler agent JVM arguments in
profiler.info.jvmargs.agent
Lab 1/Banking System/nbproject/genfiles.properties
build.xml.data.CRC32=db319861
build.xml.script.CRC32=538a4852
[email protected]
# This file is used by a NetBeans-based IDE to track changes in
generated files such as build-impl.xml.
# Do not edit this file. You may delete it but then the IDE will
never regenerate such files for you.
nbproject/build-impl.xml.data.CRC32=db319861
nbproject/build-impl.xml.script.CRC32=ae7b57ca
nbproject/[email protected]
Lab 1/Banking System/nbproject/private/private.properties
compile.on.save=true
user.properties.file=C:UsersdstrongAppDataRoamingNet
Beans8.2build.properties
Lab 1/Banking System/nbproject/private/private.xml
file:/C:/Users/dstrong/Documents/Yogi/Courses/CIS640/Project
s/Labs/Banking%20System/Banking%20System/src/banking/do
main/Transaction.java
file:/C:/Users/dstrong/Documents/Yogi/Courses/CIS640/Project
s/Labs/Banking%20System/Banking%20System/src/banking/dat
abase/TransactionDA.java
Lab 1/Banking System/nbproject/project.properties
annotation.processing.enabled=true
annotation.processing.enabled.in.editor=false
annotation.processing.processor.options=
annotation.processing.processors.list=
annotation.processing.run.all.processors=true
annotation.processing.source.output=${build.generated.sources.
dir}/ap-source-output
build.classes.dir=${build.dir}/classes
build.classes.excludes=**/*.java,**/*.form
# This directory is removed when the project is cleaned:
build.dir=build
build.generated.dir=${build.dir}/generated
build.generated.sources.dir=${build.dir}/generated-sources
# Only compile against the classpath explicitly listed here:
build.sysclasspath=ignore
build.test.classes.dir=${build.dir}/test/classes
build.test.results.dir=${build.dir}/test/results
# Uncomment to specify the preferred debugger connection
transport:
#debug.transport=dt_socket
debug.classpath=
${run.classpath}
debug.test.classpath=
${run.test.classpath}
# Files in build.classes.dir which should be excluded from
distribution jar
dist.archive.excludes=
# This directory is removed when the project is cleaned:
dist.dir=dist
dist.jar=${dist.dir}/Banking_System.jar
dist.javadoc.dir=${dist.dir}/javadoc
excludes=
includes=**
jar.compress=false
javac.classpath=
# Space-separated list of extra javac options
javac.compilerargs=
javac.deprecation=false
javac.external.vm=true
javac.processorpath=
${javac.classpath}
javac.source=1.8
javac.target=1.8
javac.test.classpath=
${javac.classpath}:
${build.classes.dir}
javac.test.processorpath=
${javac.test.classpath}
javadoc.additionalparam=
javadoc.author=false
javadoc.encoding=${source.encoding}
javadoc.noindex=false
javadoc.nonavbar=false
javadoc.notree=false
javadoc.private=false
javadoc.splitindex=true
javadoc.use=true
javadoc.version=false
javadoc.windowtitle=
main.class=banking.BankingSystem
manifest.file=manifest.mf
meta.inf.dir=${src.dir}/META-INF
mkdist.disabled=false
platform.active=default_platform
run.classpath=
${javac.classpath}:
${build.classes.dir}
# Space-separated list of JVM arguments used when running the
project.
# You may also define separate properties like run-sys-
prop.name=value instead of -Dname=value.
# To set system properties for unit tests define test-sys-
prop.name=value:
run.jvmargs=
run.test.classpath=
${javac.test.classpath}:
${build.test.classes.dir}
source.encoding=UTF-8
src.dir=src
test.src.dir=test
Lab 1/Banking System/nbproject/project.xml
org.netbeans.modules.java.j2seproject
Banking System
Lab 1/Banking System/src/banking/BankingSystem.javaLab
1/Banking
System/src/banking/BankingSystem.javapackage banking;
import banking.domain.Customer;
import banking.domain.Account;
import banking.domain.Transaction;
import java.util.ArrayList;
publicclassBankingSystem{
publicstaticvoid main(String[] args){
Customer.initialize();
Account.initialize();
Transaction.initialize();
ArrayList<Customer> customers =Customer.getCustomers();
for(int i =0; i < customers.size(); i++){
System.out.println(customers.get(i));
}
}
}
Lab 1/Banking
System/src/banking/database/AccountDA.javaLab 1/Banking
System/src/banking/database/AccountDA.javapackage banking.d
atabase;
import banking.domain.Account;
import banking.domain.Asset;
import banking.domain.Liability;
import java.util.ArrayList;
import java.util.Date;
publicclassAccountDA{
publicstaticArrayList<Account> accounts =newArrayList<Acco
unt>(5);
publicstaticvoid add(Account acc){
accounts.add(acc);
}
publicstaticArrayList<Account> getCustomerAccounts(int custI
D){
Account acc;
ArrayList<Account> customerAccounts =newArrayList<Accoun
t>(5);
for(int i =0; i < accounts.size(); i++){
acc = accounts.get(i);
if(acc.getCustomerID()== custID)
customerAccounts.add(acc);
}
return customerAccounts;
}
publicstaticvoid initialize(){
Account a;
Date today =newDate();
a =newAsset();
a.setAccountNumber(10101);
a.setCustomerID(101);
a.setAccountName("Customer One Checking Account");
a.setDateOpened(today);
a.add();
a =newAsset();
a.setAccountNumber(10102);
a.setCustomerID(101);
a.setAccountName("Customer One Savings Account");
a.setDateOpened(today);
a.add();
a =newAsset();
a.setAccountNumber(10201);
a.setCustomerID(102);
a.setAccountName("Savings Account");
a.setDateOpened(today);
a.add();
a =newLiability();
a.setAccountNumber(10202);
a.setCustomerID(102);
a.setAccountName("Customer Two Credit Card");
a.setDateOpened(today);
a.add();
}
}
Lab 1/Banking
System/src/banking/database/CustomerDA.javaLab 1/Banking
System/src/banking/database/CustomerDA.javapackage banking.
database;
import banking.domain.Customer;
import java.util.ArrayList;
publicclassCustomerDA{
privatestaticArrayList<Customer> customers =newArrayList<C
ustomer>(5);
publicstaticvoid add(Customer c){
customers.add(c);
}
publicstaticArrayList<Customer> getCustomers(){
return customers;
}
publicstaticvoid inititialize(){
Customer c;
c =newCustomer();
c.setCustomerID(101);
c.setName("Customer One");
c.setPhoneNumber(5551212);
c.add();
c =newCustomer();
c.setCustomerID(102);
c.setName("Customer Two");
c.setPhoneNumber(4442323);
c.add();
}
}
Lab 1/Banking
System/src/banking/database/TransactionDA.javaLab 1/Banking
System/src/banking/database/TransactionDA.javapackage banki
ng.database;
import banking.domain.Transaction;
import java.util.ArrayList;
import java.util.Date;
publicclassTransactionDA{
privatestaticArrayList<Transaction> transactions =newArrayLis
t<Transaction>(5);
publicstaticvoid add(Transaction trans){
trans.setTransactionID(transactions.size()+1);
transactions.add(trans);
}
publicstaticArrayList<Transaction> getAccountTransactions(int
accNo){
ArrayList<Transaction> accountTransactions =newArrayList<Tr
ansaction>(5);
Transaction trans;
for(int i =0; i < transactions.size(); i++){
trans = transactions.get(i);
if(accNo == trans.getAccountNumber())
accountTransactions.add(trans);
}
return accountTransactions;
}
publicstaticvoid initialize(){
Transaction t;
Date today =newDate();
t =newTransaction();
t.setAccountNumber(10101);
t.setTransactionDate(today);
t.setDescription("Transaction 1");
t.setAmount(100);
t.add();
t =newTransaction();
t.setAccountNumber(10101);
t.setTransactionDate(today);
t.setDescription("Transaction 2");
t.setAmount(-21.95);
t.add();
t =newTransaction();
t.setAccountNumber(10101);
t.setTransactionDate(today);
t.setDescription("Transaction 3");
t.setAmount(16.25);
t.add();
t =newTransaction();
t.setAccountNumber(10102);
t.setTransactionDate(today);
t.setDescription("Transaction 1");
t.setAmount(50.00);
t.add();
t =newTransaction();
t.setAccountNumber(10102);
t.setTransactionDate(today);
t.setDescription("Transaction 2");
t.setAmount(250.00);
t.add();
t =newTransaction();
t.setAccountNumber(10102);
t.setTransactionDate(today);
t.setDescription("Transaction 3");
t.setAmount(-10.00);
t.add();
t =newTransaction();
t.setAccountNumber(10202);
t.setTransactionDate(today);
t.setDescription("Transaction 1");
t.setAmount(500.00);
t.add();
t =newTransaction();
t.setAccountNumber(10202);
t.setTransactionDate(today);
t.setDescription("Transaction 2");
t.setAmount(-50.00);
t.add();
t =newTransaction();
t.setAccountNumber(10202);
t.setTransactionDate(today);
t.setDescription("Transaction 3");
t.setAmount(25.00);
t.add();
t =newTransaction();
t.setAccountNumber(10201);
t.setTransactionDate(today);
t.setDescription("Transaction 1");
t.setAmount(49.75);
t.add();
t =newTransaction();
t.setAccountNumber(10201);
t.setTransactionDate(today);
t.setDescription("Transaction 2");
t.setAmount(16.25);
t.add();
t =newTransaction();
t.setAccountNumber(10201);
t.setTransactionDate(today);
t.setDescription("Transaction 3");
t.setAmount(-25.0);
t.add();
}
}
Lab 1/Banking System/src/banking/domain/Account.javaLab
1/Banking
System/src/banking/domain/Account.javapackage banking.doma
in;
import banking.database.AccountDA;
import java.util.Date;
import java.util.ArrayList;
publicabstractclassAccount{
privateint accountNumber;
privateint customerID;
privateString accountName;
privateDate dateOpened;
publicvoid add(){
AccountDA.add(this);
}
publicString getAccountName(){
return accountName;
}
publicint getAccountNumber(){
return accountNumber;
}
publicstaticArrayList<Account> getCustomerAccounts(int custI
D){
returnAccountDA.getCustomerAccounts(custID);
}
publicint getCustomerID(){
return customerID;
}
publicDate getDateOpened(){
return dateOpened;
}
publicArrayList<Transaction> getTransactions(){
returnTransaction.getAccountTransactions(accountNumber);
}
publicstaticvoid initialize(){
AccountDA.initialize();
}
publicvoid setAccountName(String accountName){
this.accountName = accountName;
}
publicvoid setAccountNumber(int accountNumber){
this.accountNumber = accountNumber;
}
publicvoid setCustomerID(int customerID){
this.customerID = customerID;
}
publicvoid setDateOpened(Date dateOpened){
this.dateOpened = dateOpened;
}
publicString toString(){
ArrayList<Transaction> transactions = getTransactions();
double sum =0.0;
String returnString ="Account: "+ accountNumber +" "+ accoun
tName +" "+ dateOpened;
for(int i =0; i < transactions.size(); i++){
sum = sum+= transactions.get(i).getAmount();
returnString = returnString +"n "+ transactions.g
et(i)+" "+ sum;
}
return returnString;
}
}
Lab 1/Banking System/src/banking/domain/Asset.javaLab
1/Banking
System/src/banking/domain/Asset.javapackage banking.domain;
publicclassAssetextendsAccount{
}
Lab 1/Banking System/src/banking/domain/Customer.javaLab
1/Banking
System/src/banking/domain/Customer.javapackage banking.dom
ain;
import banking.database.CustomerDA;
import banking.domain.Account;
import java.util.ArrayList;
publicclassCustomer{
privateint customerID;
privateString name;
privatelong phoneNumber;
publicvoid add(){
CustomerDA.add(this);
}
publicstaticvoid add(Customer c){
CustomerDA.add(c);
}
publicArrayList<Account> getAccounts(){
returnAccount.getCustomerAccounts(customerID);
}
publicint getCustomerID(){
return customerID;
}
publicstaticArrayList<Customer> getCustomers(){
returnCustomerDA.getCustomers();
}
publicString getName(){
return name;
}
publiclong getPhoneNumber(){
return phoneNumber;
}
publicvoid setCustomerID(int customerID){
this.customerID = customerID;
}
publicvoid setName(String name){
this.name = name;
}
publicvoid setPhoneNumber(long phoneNumber){
this.phoneNumber = phoneNumber;
}
publicstaticvoid initialize(){
CustomerDA.inititialize();
}
publicString toString(){
String returnString ="nCustomer "+ customerID +" "+ name;
ArrayList<Account> accounts = getAccounts();
for(int i =0; i < accounts.size(); i++){
returnString = returnString +"n "+ accounts.get(i);
}
return returnString;
}
}
Lab 1/Banking System/src/banking/domain/Liability.javaLab
1/Banking
System/src/banking/domain/Liability.javapackage banking.doma
in;
publicclassLiabilityextendsAccount{
}
Lab 1/Banking System/src/banking/domain/Transaction.javaLab
1/Banking
System/src/banking/domain/Transaction.javapackage banking.do
main;
import banking.database.TransactionDA;
import java.util.ArrayList;
import java.util.Date;
publicclassTransaction{
privatedouble amount;
privateint transactionID;
privateDate transactionDate;
privateint accountNumber;
privateString description;
publicvoid add(){
TransactionDA.add(this);
}
publicint getAccountNumber(){
return accountNumber;
}
publicdouble getAmount(){
return amount;
}
publicstaticArrayList<Transaction> getAccountTransactions(int
accNo){
returnTransactionDA.getAccountTransactions(accNo);
}
publicString getDescription(){
return description;
}
publicDate getTransactionDate(){
return transactionDate;
}
publicint getTransactionID(){
return transactionID;
}
publicstaticvoid initialize(){
TransactionDA.initialize();
}
publicvoid setAccountNumber(int accountNumber){
this.accountNumber = accountNumber;
}
publicvoid setAmount(double amount){
this.amount = amount;
}
publicvoid setDescription(StringDescription){
this.description =Description;
}
publicvoid setTransactionDate(Date transactionDate){
this.transactionDate = transactionDate;
}
publicvoid setTransactionID(int transactionID){
this.transactionID = transactionID;
}
publicString toString(){
return""+ transactionID +" "+ transactionDate +" "+ description
+" "+ amount;
}
}

More Related Content

Similar to Lab 1Banking Systembuild.xmlBuilds, tests, and runs the proj.docx

AlarmClockAlarmClockAlarmClock.Designer.vbGlobal.Microsoft..docx
AlarmClockAlarmClockAlarmClock.Designer.vbGlobal.Microsoft..docxAlarmClockAlarmClockAlarmClock.Designer.vbGlobal.Microsoft..docx
AlarmClockAlarmClockAlarmClock.Designer.vbGlobal.Microsoft..docx
galerussel59292
 
Intro To JavaScript Unit Testing - Ran Mizrahi
Intro To JavaScript Unit Testing - Ran MizrahiIntro To JavaScript Unit Testing - Ran Mizrahi
Intro To JavaScript Unit Testing - Ran Mizrahi
Ran Mizrahi
 
Javascript unit testing, yes we can e big
Javascript unit testing, yes we can   e bigJavascript unit testing, yes we can   e big
Javascript unit testing, yes we can e big
Andy Peterson
 

Similar to Lab 1Banking Systembuild.xmlBuilds, tests, and runs the proj.docx (20)

Generated by CamScanner from intsig.comR416build.xml.docx
Generated by CamScanner from intsig.comR416build.xml.docxGenerated by CamScanner from intsig.comR416build.xml.docx
Generated by CamScanner from intsig.comR416build.xml.docx
 
In Memory Unit Testing with Apache DbUnit
In Memory Unit Testing with Apache DbUnitIn Memory Unit Testing with Apache DbUnit
In Memory Unit Testing with Apache DbUnit
 
Unit Testing DFC
Unit Testing DFCUnit Testing DFC
Unit Testing DFC
 
Unit Testing on Android - Droidcon Berlin 2015
Unit Testing on Android - Droidcon Berlin 2015Unit Testing on Android - Droidcon Berlin 2015
Unit Testing on Android - Droidcon Berlin 2015
 
Unit Testing Documentum Foundation Classes Code
Unit Testing Documentum Foundation Classes CodeUnit Testing Documentum Foundation Classes Code
Unit Testing Documentum Foundation Classes Code
 
Dusan Lukic Magento 2 Integration Tests Meet Magento Serbia 2016
Dusan Lukic Magento 2 Integration Tests Meet Magento Serbia 2016Dusan Lukic Magento 2 Integration Tests Meet Magento Serbia 2016
Dusan Lukic Magento 2 Integration Tests Meet Magento Serbia 2016
 
Total Compensationbuild.xml Builds, tests, and runs th.docx
Total Compensationbuild.xml      Builds, tests, and runs th.docxTotal Compensationbuild.xml      Builds, tests, and runs th.docx
Total Compensationbuild.xml Builds, tests, and runs th.docx
 
AD208 - End to End Quality Processes for Top Notch XPages Apps
AD208 - End to End Quality Processes for Top Notch XPages AppsAD208 - End to End Quality Processes for Top Notch XPages Apps
AD208 - End to End Quality Processes for Top Notch XPages Apps
 
HW_6-1build.xml Builds, tests, and runs the project HW.docx
HW_6-1build.xml      Builds, tests, and runs the project HW.docxHW_6-1build.xml      Builds, tests, and runs the project HW.docx
HW_6-1build.xml Builds, tests, and runs the project HW.docx
 
AlarmClockAlarmClockAlarmClock.Designer.vbGlobal.Microsoft..docx
AlarmClockAlarmClockAlarmClock.Designer.vbGlobal.Microsoft..docxAlarmClockAlarmClockAlarmClock.Designer.vbGlobal.Microsoft..docx
AlarmClockAlarmClockAlarmClock.Designer.vbGlobal.Microsoft..docx
 
Intro To JavaScript Unit Testing - Ran Mizrahi
Intro To JavaScript Unit Testing - Ran MizrahiIntro To JavaScript Unit Testing - Ran Mizrahi
Intro To JavaScript Unit Testing - Ran Mizrahi
 
Improving your Gradle builds
Improving your Gradle buildsImproving your Gradle builds
Improving your Gradle builds
 
JavaOne 2016: Life after Modularity
JavaOne 2016: Life after ModularityJavaOne 2016: Life after Modularity
JavaOne 2016: Life after Modularity
 
Grails Connecting to MySQL
Grails Connecting to MySQLGrails Connecting to MySQL
Grails Connecting to MySQL
 
Presto Testing Tools: Benchto & Tempto (Presto Boston Meetup 10062015)
Presto Testing Tools: Benchto & Tempto (Presto Boston Meetup 10062015)Presto Testing Tools: Benchto & Tempto (Presto Boston Meetup 10062015)
Presto Testing Tools: Benchto & Tempto (Presto Boston Meetup 10062015)
 
Broncosbuild.xmlBuilds, tests, and runs the project Broncos..docx
Broncosbuild.xmlBuilds, tests, and runs the project Broncos..docxBroncosbuild.xmlBuilds, tests, and runs the project Broncos..docx
Broncosbuild.xmlBuilds, tests, and runs the project Broncos..docx
 
Broncosbuild.xmlBuilds, tests, and runs the project Broncos..docx
Broncosbuild.xmlBuilds, tests, and runs the project Broncos..docxBroncosbuild.xmlBuilds, tests, and runs the project Broncos..docx
Broncosbuild.xmlBuilds, tests, and runs the project Broncos..docx
 
Browser testing with nightwatch.js
Browser testing with nightwatch.jsBrowser testing with nightwatch.js
Browser testing with nightwatch.js
 
Chapter6 database connectivity
Chapter6 database connectivityChapter6 database connectivity
Chapter6 database connectivity
 
Javascript unit testing, yes we can e big
Javascript unit testing, yes we can   e bigJavascript unit testing, yes we can   e big
Javascript unit testing, yes we can e big
 

More from croysierkathey

1.What are the main issues facing Fargo and Town Manager Susan.docx
1.What are the main issues facing Fargo and Town Manager Susan.docx1.What are the main issues facing Fargo and Town Manager Susan.docx
1.What are the main issues facing Fargo and Town Manager Susan.docx
croysierkathey
 
1.Writing Practice in Reading a PhotographAttached Files.docx
1.Writing Practice in Reading a PhotographAttached Files.docx1.Writing Practice in Reading a PhotographAttached Files.docx
1.Writing Practice in Reading a PhotographAttached Files.docx
croysierkathey
 
1.The following clause was added to the Food and Drug Actthe S.docx
1.The following clause was added to the Food and Drug Actthe S.docx1.The following clause was added to the Food and Drug Actthe S.docx
1.The following clause was added to the Food and Drug Actthe S.docx
croysierkathey
 
1.This week, we’ve been introduced to the humanities and have ta.docx
1.This week, we’ve been introduced to the humanities and have ta.docx1.This week, we’ve been introduced to the humanities and have ta.docx
1.This week, we’ve been introduced to the humanities and have ta.docx
croysierkathey
 

More from croysierkathey (20)

1.  Discuss the organization and the family role in every one of the.docx
1.  Discuss the organization and the family role in every one of the.docx1.  Discuss the organization and the family role in every one of the.docx
1.  Discuss the organization and the family role in every one of the.docx
 
1.  Compare and contrast DEmilios Capitalism and Gay Identity .docx
1.  Compare and contrast DEmilios Capitalism and Gay Identity .docx1.  Compare and contrast DEmilios Capitalism and Gay Identity .docx
1.  Compare and contrast DEmilios Capitalism and Gay Identity .docx
 
1.Purpose the purpose of this essay is to spread awareness .docx
1.Purpose the purpose of this essay is to spread awareness .docx1.Purpose the purpose of this essay is to spread awareness .docx
1.Purpose the purpose of this essay is to spread awareness .docx
 
1.  Tell us why it is your favorite film.2.  Talk about the .docx
1.  Tell us why it is your favorite film.2.  Talk about the .docx1.  Tell us why it is your favorite film.2.  Talk about the .docx
1.  Tell us why it is your favorite film.2.  Talk about the .docx
 
1.What are the main issues facing Fargo and Town Manager Susan.docx
1.What are the main issues facing Fargo and Town Manager Susan.docx1.What are the main issues facing Fargo and Town Manager Susan.docx
1.What are the main issues facing Fargo and Town Manager Susan.docx
 
1.Writing Practice in Reading a PhotographAttached Files.docx
1.Writing Practice in Reading a PhotographAttached Files.docx1.Writing Practice in Reading a PhotographAttached Files.docx
1.Writing Practice in Reading a PhotographAttached Files.docx
 
1.Some say that analytics in general dehumanize managerial activitie.docx
1.Some say that analytics in general dehumanize managerial activitie.docx1.Some say that analytics in general dehumanize managerial activitie.docx
1.Some say that analytics in general dehumanize managerial activitie.docx
 
1.What is the psychological term for the symptoms James experiences .docx
1.What is the psychological term for the symptoms James experiences .docx1.What is the psychological term for the symptoms James experiences .docx
1.What is the psychological term for the symptoms James experiences .docx
 
1.Write at least 500 words discussing the benefits of using R with H.docx
1.Write at least 500 words discussing the benefits of using R with H.docx1.Write at least 500 words discussing the benefits of using R with H.docx
1.Write at least 500 words discussing the benefits of using R with H.docx
 
1.What is Starbucks’ ROA for 2012, 2011, and 2010 Why might focusin.docx
1.What is Starbucks’ ROA for 2012, 2011, and 2010 Why might focusin.docx1.What is Starbucks’ ROA for 2012, 2011, and 2010 Why might focusin.docx
1.What is Starbucks’ ROA for 2012, 2011, and 2010 Why might focusin.docx
 
1.  Discuss the cultural development of the Japanese and the Jewis.docx
1.  Discuss the cultural development of the Japanese and the Jewis.docx1.  Discuss the cultural development of the Japanese and the Jewis.docx
1.  Discuss the cultural development of the Japanese and the Jewis.docx
 
1.  Discuss at least 2  contextual factors(family, peers,  school,.docx
1.  Discuss at least 2  contextual factors(family, peers,  school,.docx1.  Discuss at least 2  contextual factors(family, peers,  school,.docx
1.  Discuss at least 2  contextual factors(family, peers,  school,.docx
 
1.Write at least 500 words in APA format discussing how to use senti.docx
1.Write at least 500 words in APA format discussing how to use senti.docx1.Write at least 500 words in APA format discussing how to use senti.docx
1.Write at least 500 words in APA format discussing how to use senti.docx
 
1.The following clause was added to the Food and Drug Actthe S.docx
1.The following clause was added to the Food and Drug Actthe S.docx1.The following clause was added to the Food and Drug Actthe S.docx
1.The following clause was added to the Food and Drug Actthe S.docx
 
1.What are social determinants of health  Explain how social determ.docx
1.What are social determinants of health  Explain how social determ.docx1.What are social determinants of health  Explain how social determ.docx
1.What are social determinants of health  Explain how social determ.docx
 
1.This week, we’ve been introduced to the humanities and have ta.docx
1.This week, we’ve been introduced to the humanities and have ta.docx1.This week, we’ve been introduced to the humanities and have ta.docx
1.This week, we’ve been introduced to the humanities and have ta.docx
 
1.What are barriers to listening2.Communicators identif.docx
1.What are barriers to listening2.Communicators identif.docx1.What are barriers to listening2.Communicators identif.docx
1.What are barriers to listening2.Communicators identif.docx
 
1.Timeline description and details There are multiple way.docx
1.Timeline description and details There are multiple way.docx1.Timeline description and details There are multiple way.docx
1.Timeline description and details There are multiple way.docx
 
1.The PresidentArticle II of the Constitution establishe.docx
1.The PresidentArticle II of the Constitution establishe.docx1.The PresidentArticle II of the Constitution establishe.docx
1.The PresidentArticle II of the Constitution establishe.docx
 
1.What other potential root causes might influence patient fal.docx
1.What other potential root causes might influence patient fal.docx1.What other potential root causes might influence patient fal.docx
1.What other potential root causes might influence patient fal.docx
 

Recently uploaded

Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
Chris Hunter
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
negromaestrong
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch Letter
MateoGardella
 
An Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfAn Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdf
SanaAli374401
 

Recently uploaded (20)

How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch Letter
 
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
 
An Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfAn Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdf
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 

Lab 1Banking Systembuild.xmlBuilds, tests, and runs the proj.docx

  • 1. Lab 1/Banking System/build.xml Builds, tests, and runs the project Banking System. Lab 1/Banking System/build/classes/.netbeans_automatic_build Lab 1/Banking System/build/classes/.netbeans_update_resources Lab 1/Banking System/build/classes/banking/BankingSystem.classpackage banking; publicsynchronizedclass BankingSystem { public void BankingSystem(); publicstatic void main(String[]); } Lab 1/Banking System/build/classes/banking/database/AccountDA.classpackag e banking.database; publicsynchronizedclass AccountDA { publicstatic java.util.ArrayList accounts; public void AccountDA(); publicstatic void add(banking.domain.Account); publicstatic java.util.ArrayList getCustomerAccounts(int); publicstatic void initialize(); static void <clinit>(); }
  • 2. Lab 1/Banking System/build/classes/banking/database/CustomerDA.classpacka ge banking.database; publicsynchronizedclass CustomerDA { privatestatic java.util.ArrayList customers; public void CustomerDA(); publicstatic void add(banking.domain.Customer); publicstatic java.util.ArrayList getCustomers(); publicstatic void inititialize(); static void <clinit>(); } Lab 1/Banking System/build/classes/banking/database/TransactionDA.classpac kage banking.database; publicsynchronizedclass TransactionDA { privatestatic java.util.ArrayList transactions; public void TransactionDA(); publicstatic void add(banking.domain.Transaction); publicstatic java.util.ArrayList getAccountTransactions(int); publicstatic void initialize(); static void <clinit>(); } Lab 1/Banking System/build/classes/banking/domain/Account.classpackage banking.domain; publicabstractsynchronizedclass Account { private int accountNumber; private int customerID; private String accountName; private java.util.Date dateOpened; public void Account();
  • 3. public void add(); public String getAccountName(); public int getAccountNumber(); publicstatic java.util.ArrayList getCustomerAccounts(int); public int getCustomerID(); public java.util.Date getDateOpened(); public java.util.ArrayList getTransactions(); publicstatic void initialize(); public void setAccountName(String); public void setAccountNumber(int); public void setCustomerID(int); public void setDateOpened(java.util.Date); public String toString(); } Lab 1/Banking System/build/classes/banking/domain/Asset.classpackage banking.domain; publicsynchronizedclass Asset extends Account { public void Asset(); } Lab 1/Banking System/build/classes/banking/domain/Customer.classpackage banking.domain; publicsynchronizedclass Customer { private int customerID; private String name; private long phoneNumber; public void Customer(); public void add(); publicstatic void add(Customer); public java.util.ArrayList getAccounts(); public int getCustomerID();
  • 4. publicstatic java.util.ArrayList getCustomers(); public String getName(); public long getPhoneNumber(); public void setCustomerID(int); public void setName(String); public void setPhoneNumber(long); publicstatic void initialize(); public String toString(); } Lab 1/Banking System/build/classes/banking/domain/Liability.classpackage banking.domain; publicsynchronizedclass Liability extends Account { public void Liability(); } Lab 1/Banking System/build/classes/banking/domain/Transaction.classpackage banking.domain; publicsynchronizedclass Transaction { private double amount; private int transactionID; private java.util.Date transactionDate; private int accountNumber; private String description; public void Transaction(); public void add(); public int getAccountNumber(); public double getAmount(); publicstatic java.util.ArrayList getAccountTransactions(int); public String getDescription(); public java.util.Date getTransactionDate(); public int getTransactionID();
  • 5. publicstatic void initialize(); public void setAccountNumber(int); public void setAmount(double); public void setDescription(String); public void setTransactionDate(java.util.Date); public void setTransactionID(int); public String toString(); } Lab 1/Banking System/manifest.mf Manifest-Version: 1.0 X-COMMENT: Main-Class will be added automatically by build Lab 1/Banking System/nbproject/build-impl.xml Must set src.dir Must set test.src.dir Must set build.dir Must set dist.dir Must set build.classes.dir Must set dist.javadoc.dir Must set build.test.classes.dir Must set build.test.results.dir Must set build.classes.excludes Must set dist.jar
  • 6.
  • 7.
  • 9.
  • 10.
  • 11.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19. Must set JVM to use for profiling in profiler.info.jvm Must set profiler agent JVM arguments in profiler.info.jvmargs.agent
  • 20.
  • 21.
  • 22. Lab 1/Banking System/nbproject/genfiles.properties build.xml.data.CRC32=db319861 build.xml.script.CRC32=538a4852 [email protected] # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. nbproject/build-impl.xml.data.CRC32=db319861 nbproject/build-impl.xml.script.CRC32=ae7b57ca nbproject/[email protected] Lab 1/Banking System/nbproject/private/private.properties compile.on.save=true user.properties.file=C:UsersdstrongAppDataRoamingNet Beans8.2build.properties Lab 1/Banking System/nbproject/private/private.xml file:/C:/Users/dstrong/Documents/Yogi/Courses/CIS640/Project s/Labs/Banking%20System/Banking%20System/src/banking/do main/Transaction.java
  • 23. file:/C:/Users/dstrong/Documents/Yogi/Courses/CIS640/Project s/Labs/Banking%20System/Banking%20System/src/banking/dat abase/TransactionDA.java Lab 1/Banking System/nbproject/project.properties annotation.processing.enabled=true annotation.processing.enabled.in.editor=false annotation.processing.processor.options= annotation.processing.processors.list= annotation.processing.run.all.processors=true annotation.processing.source.output=${build.generated.sources. dir}/ap-source-output build.classes.dir=${build.dir}/classes build.classes.excludes=**/*.java,**/*.form # This directory is removed when the project is cleaned: build.dir=build build.generated.dir=${build.dir}/generated build.generated.sources.dir=${build.dir}/generated-sources # Only compile against the classpath explicitly listed here:
  • 24. build.sysclasspath=ignore build.test.classes.dir=${build.dir}/test/classes build.test.results.dir=${build.dir}/test/results # Uncomment to specify the preferred debugger connection transport: #debug.transport=dt_socket debug.classpath= ${run.classpath} debug.test.classpath= ${run.test.classpath} # Files in build.classes.dir which should be excluded from distribution jar dist.archive.excludes= # This directory is removed when the project is cleaned: dist.dir=dist dist.jar=${dist.dir}/Banking_System.jar dist.javadoc.dir=${dist.dir}/javadoc excludes= includes=**
  • 25. jar.compress=false javac.classpath= # Space-separated list of extra javac options javac.compilerargs= javac.deprecation=false javac.external.vm=true javac.processorpath= ${javac.classpath} javac.source=1.8 javac.target=1.8 javac.test.classpath= ${javac.classpath}: ${build.classes.dir} javac.test.processorpath= ${javac.test.classpath} javadoc.additionalparam= javadoc.author=false javadoc.encoding=${source.encoding}
  • 27. # You may also define separate properties like run-sys- prop.name=value instead of -Dname=value. # To set system properties for unit tests define test-sys- prop.name=value: run.jvmargs= run.test.classpath= ${javac.test.classpath}: ${build.test.classes.dir} source.encoding=UTF-8 src.dir=src test.src.dir=test Lab 1/Banking System/nbproject/project.xml org.netbeans.modules.java.j2seproject Banking System
  • 28. Lab 1/Banking System/src/banking/BankingSystem.javaLab 1/Banking System/src/banking/BankingSystem.javapackage banking; import banking.domain.Customer; import banking.domain.Account; import banking.domain.Transaction; import java.util.ArrayList; publicclassBankingSystem{ publicstaticvoid main(String[] args){ Customer.initialize(); Account.initialize(); Transaction.initialize(); ArrayList<Customer> customers =Customer.getCustomers(); for(int i =0; i < customers.size(); i++){ System.out.println(customers.get(i)); } } } Lab 1/Banking System/src/banking/database/AccountDA.javaLab 1/Banking System/src/banking/database/AccountDA.javapackage banking.d atabase; import banking.domain.Account; import banking.domain.Asset; import banking.domain.Liability;
  • 29. import java.util.ArrayList; import java.util.Date; publicclassAccountDA{ publicstaticArrayList<Account> accounts =newArrayList<Acco unt>(5); publicstaticvoid add(Account acc){ accounts.add(acc); } publicstaticArrayList<Account> getCustomerAccounts(int custI D){ Account acc; ArrayList<Account> customerAccounts =newArrayList<Accoun t>(5); for(int i =0; i < accounts.size(); i++){ acc = accounts.get(i); if(acc.getCustomerID()== custID) customerAccounts.add(acc); } return customerAccounts; } publicstaticvoid initialize(){ Account a; Date today =newDate(); a =newAsset(); a.setAccountNumber(10101); a.setCustomerID(101); a.setAccountName("Customer One Checking Account"); a.setDateOpened(today); a.add();
  • 30. a =newAsset(); a.setAccountNumber(10102); a.setCustomerID(101); a.setAccountName("Customer One Savings Account"); a.setDateOpened(today); a.add(); a =newAsset(); a.setAccountNumber(10201); a.setCustomerID(102); a.setAccountName("Savings Account"); a.setDateOpened(today); a.add(); a =newLiability(); a.setAccountNumber(10202); a.setCustomerID(102); a.setAccountName("Customer Two Credit Card"); a.setDateOpened(today); a.add(); } } Lab 1/Banking System/src/banking/database/CustomerDA.javaLab 1/Banking System/src/banking/database/CustomerDA.javapackage banking. database; import banking.domain.Customer; import java.util.ArrayList; publicclassCustomerDA{ privatestaticArrayList<Customer> customers =newArrayList<C ustomer>(5);
  • 31. publicstaticvoid add(Customer c){ customers.add(c); } publicstaticArrayList<Customer> getCustomers(){ return customers; } publicstaticvoid inititialize(){ Customer c; c =newCustomer(); c.setCustomerID(101); c.setName("Customer One"); c.setPhoneNumber(5551212); c.add(); c =newCustomer(); c.setCustomerID(102); c.setName("Customer Two"); c.setPhoneNumber(4442323); c.add(); } } Lab 1/Banking System/src/banking/database/TransactionDA.javaLab 1/Banking System/src/banking/database/TransactionDA.javapackage banki ng.database; import banking.domain.Transaction; import java.util.ArrayList; import java.util.Date;
  • 32. publicclassTransactionDA{ privatestaticArrayList<Transaction> transactions =newArrayLis t<Transaction>(5); publicstaticvoid add(Transaction trans){ trans.setTransactionID(transactions.size()+1); transactions.add(trans); } publicstaticArrayList<Transaction> getAccountTransactions(int accNo){ ArrayList<Transaction> accountTransactions =newArrayList<Tr ansaction>(5); Transaction trans; for(int i =0; i < transactions.size(); i++){ trans = transactions.get(i); if(accNo == trans.getAccountNumber()) accountTransactions.add(trans); } return accountTransactions; } publicstaticvoid initialize(){ Transaction t; Date today =newDate(); t =newTransaction(); t.setAccountNumber(10101); t.setTransactionDate(today); t.setDescription("Transaction 1"); t.setAmount(100); t.add(); t =newTransaction();
  • 33. t.setAccountNumber(10101); t.setTransactionDate(today); t.setDescription("Transaction 2"); t.setAmount(-21.95); t.add(); t =newTransaction(); t.setAccountNumber(10101); t.setTransactionDate(today); t.setDescription("Transaction 3"); t.setAmount(16.25); t.add(); t =newTransaction(); t.setAccountNumber(10102); t.setTransactionDate(today); t.setDescription("Transaction 1"); t.setAmount(50.00); t.add(); t =newTransaction(); t.setAccountNumber(10102); t.setTransactionDate(today); t.setDescription("Transaction 2"); t.setAmount(250.00); t.add(); t =newTransaction(); t.setAccountNumber(10102); t.setTransactionDate(today); t.setDescription("Transaction 3"); t.setAmount(-10.00); t.add(); t =newTransaction(); t.setAccountNumber(10202);
  • 34. t.setTransactionDate(today); t.setDescription("Transaction 1"); t.setAmount(500.00); t.add(); t =newTransaction(); t.setAccountNumber(10202); t.setTransactionDate(today); t.setDescription("Transaction 2"); t.setAmount(-50.00); t.add(); t =newTransaction(); t.setAccountNumber(10202); t.setTransactionDate(today); t.setDescription("Transaction 3"); t.setAmount(25.00); t.add(); t =newTransaction(); t.setAccountNumber(10201); t.setTransactionDate(today); t.setDescription("Transaction 1"); t.setAmount(49.75); t.add(); t =newTransaction(); t.setAccountNumber(10201); t.setTransactionDate(today); t.setDescription("Transaction 2"); t.setAmount(16.25); t.add(); t =newTransaction(); t.setAccountNumber(10201); t.setTransactionDate(today);
  • 35. t.setDescription("Transaction 3"); t.setAmount(-25.0); t.add(); } } Lab 1/Banking System/src/banking/domain/Account.javaLab 1/Banking System/src/banking/domain/Account.javapackage banking.doma in; import banking.database.AccountDA; import java.util.Date; import java.util.ArrayList; publicabstractclassAccount{ privateint accountNumber; privateint customerID; privateString accountName; privateDate dateOpened; publicvoid add(){ AccountDA.add(this); } publicString getAccountName(){ return accountName; } publicint getAccountNumber(){ return accountNumber; } publicstaticArrayList<Account> getCustomerAccounts(int custI D){
  • 36. returnAccountDA.getCustomerAccounts(custID); } publicint getCustomerID(){ return customerID; } publicDate getDateOpened(){ return dateOpened; } publicArrayList<Transaction> getTransactions(){ returnTransaction.getAccountTransactions(accountNumber); } publicstaticvoid initialize(){ AccountDA.initialize(); } publicvoid setAccountName(String accountName){ this.accountName = accountName; } publicvoid setAccountNumber(int accountNumber){ this.accountNumber = accountNumber; } publicvoid setCustomerID(int customerID){ this.customerID = customerID; } publicvoid setDateOpened(Date dateOpened){ this.dateOpened = dateOpened; } publicString toString(){
  • 37. ArrayList<Transaction> transactions = getTransactions(); double sum =0.0; String returnString ="Account: "+ accountNumber +" "+ accoun tName +" "+ dateOpened; for(int i =0; i < transactions.size(); i++){ sum = sum+= transactions.get(i).getAmount(); returnString = returnString +"n "+ transactions.g et(i)+" "+ sum; } return returnString; } } Lab 1/Banking System/src/banking/domain/Asset.javaLab 1/Banking System/src/banking/domain/Asset.javapackage banking.domain; publicclassAssetextendsAccount{ } Lab 1/Banking System/src/banking/domain/Customer.javaLab 1/Banking System/src/banking/domain/Customer.javapackage banking.dom ain; import banking.database.CustomerDA; import banking.domain.Account; import java.util.ArrayList; publicclassCustomer{
  • 38. privateint customerID; privateString name; privatelong phoneNumber; publicvoid add(){ CustomerDA.add(this); } publicstaticvoid add(Customer c){ CustomerDA.add(c); } publicArrayList<Account> getAccounts(){ returnAccount.getCustomerAccounts(customerID); } publicint getCustomerID(){ return customerID; } publicstaticArrayList<Customer> getCustomers(){ returnCustomerDA.getCustomers(); } publicString getName(){ return name; } publiclong getPhoneNumber(){ return phoneNumber; } publicvoid setCustomerID(int customerID){ this.customerID = customerID; }
  • 39. publicvoid setName(String name){ this.name = name; } publicvoid setPhoneNumber(long phoneNumber){ this.phoneNumber = phoneNumber; } publicstaticvoid initialize(){ CustomerDA.inititialize(); } publicString toString(){ String returnString ="nCustomer "+ customerID +" "+ name; ArrayList<Account> accounts = getAccounts(); for(int i =0; i < accounts.size(); i++){ returnString = returnString +"n "+ accounts.get(i); } return returnString; } } Lab 1/Banking System/src/banking/domain/Liability.javaLab 1/Banking System/src/banking/domain/Liability.javapackage banking.doma in; publicclassLiabilityextendsAccount{ } Lab 1/Banking System/src/banking/domain/Transaction.javaLab
  • 40. 1/Banking System/src/banking/domain/Transaction.javapackage banking.do main; import banking.database.TransactionDA; import java.util.ArrayList; import java.util.Date; publicclassTransaction{ privatedouble amount; privateint transactionID; privateDate transactionDate; privateint accountNumber; privateString description; publicvoid add(){ TransactionDA.add(this); } publicint getAccountNumber(){ return accountNumber; } publicdouble getAmount(){ return amount; } publicstaticArrayList<Transaction> getAccountTransactions(int accNo){ returnTransactionDA.getAccountTransactions(accNo); } publicString getDescription(){ return description; }
  • 41. publicDate getTransactionDate(){ return transactionDate; } publicint getTransactionID(){ return transactionID; } publicstaticvoid initialize(){ TransactionDA.initialize(); } publicvoid setAccountNumber(int accountNumber){ this.accountNumber = accountNumber; } publicvoid setAmount(double amount){ this.amount = amount; } publicvoid setDescription(StringDescription){ this.description =Description; } publicvoid setTransactionDate(Date transactionDate){ this.transactionDate = transactionDate; } publicvoid setTransactionID(int transactionID){ this.transactionID = transactionID; } publicString toString(){ return""+ transactionID +" "+ transactionDate +" "+ description +" "+ amount;
  • 42. } }