Answered step by step
Verified Expert Solution
Question
1 Approved Answer
C++ Data Structures (Bank System UML implementation) Implement this UML diagram into actual code Main: int main() { //variables and declarations Bank b(MyFederalSavings, 123456789); //
C++ Data Structures (Bank System UML implementation)
Implement this UML diagram into actual code
Main:
int main()
{
//variables and declarations
Bank b("MyFederalSavings", 123456789);
// test implementation
b.createAccount("Me", "12345 My Street", 120.25);
b.createAccount("You", "6789 Your Street", 500.50);
b.DisplayBank();
cout
return 0;
}
Bank - name: string -routingNum: integer + Bank() + Bank(in n:string, in routingNum: int) + createAccount(in n:string, in address :string,: in balance :float): int + deleteAccount(in account: int):boolean +setname(in n: string) void +getname() :string +setroutingnum(num: int): void + getroutingnum() int 0 Account - accountNum: integer - balance: float 0 0 +Account + Account (in acctNum: int, in b: float) + Account (in acctNum: int, in b:float, in custName: string, in custAddress: string) +withdraw (in accountNum: int, in amount: float) :boolean +deposit (in accountNum: int, in amount: float) :boolean +setaccountNum(in a: int) :void + setbalance(in b: float) :void +setC(in name:string, in address:string) :void +getaccountNum) int +getbalance() :float +getC) :Customer + displayAccount( void Customer name: string - address :string + Customer) + Customer(n :string, a :string) + getName() :string + setName(string newName) :void + getAddress ( :string + setAddress(string newAddress) :void + displayCustomer(): void Bank - name: string -routingNum: integer + Bank() + Bank(in n:string, in routingNum: int) + createAccount(in n:string, in address :string,: in balance :float): int + deleteAccount(in account: int):boolean +setname(in n: string) void +getname() :string +setroutingnum(num: int): void + getroutingnum() int 0 Account - accountNum: integer - balance: float 0 0 +Account + Account (in acctNum: int, in b: float) + Account (in acctNum: int, in b:float, in custName: string, in custAddress: string) +withdraw (in accountNum: int, in amount: float) :boolean +deposit (in accountNum: int, in amount: float) :boolean +setaccountNum(in a: int) :void + setbalance(in b: float) :void +setC(in name:string, in address:string) :void +getaccountNum) int +getbalance() :float +getC) :Customer + displayAccount( void Customer name: string - address :string + Customer) + Customer(n :string, a :string) + getName() :string + setName(string newName) :void + getAddress ( :string + setAddress(string newAddress) :void + displayCustomer(): void
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started