Software Design

Design activity diagram from the code below

#include

Don't use plagiarized sources. Get Your Custom Essay on
Software Design
Just from $13/Page
Order Essay

#include

#include

#include

class bank

{

long int accno;

char name[20];

char type; //no significance across the program

float balance;

public:

bank()

{

accno=0;

strcpy(name,”NA”);

type=’ ‘;

balance=0;

}

long int returnacc();

void deposit();

void withdraw();

void transfer();

void openacc();

void viewacc();

}c[5];

long int bank::returnacc()

{

return accno; //returns acc no of the object}

void bank::deposit()

{

float amt;

cout

cin>>amt;

balance+=amt;

cout

cout

getch();

}

void bank::withdraw()

{

float amt;

cout

cin>>amt;

if((balance-amt)>=5000)

{

balance-=amt;

cout

cout

}

else

cout

getch();

}

void bank::transfer()

{

long int acno;

float amt;

int flag=1;

cout

cin>>acno;

cout

cin>>amt;

if((balance-amt)>=5000)

{

for(int i=0; i

{

if(acno==c[i].returnacc())

{

flag=1;

balance-=amt; //amt subtracted from current user

c[i].balance+=amt; //amt added to receivers account

cout

cout

}

if(flag==0) cout

}

else cout

getch();

}

void bank::openacc()

{

cout

cin>>accno;

cout

gets(name);

cout

cin>>type;

cout

cin>>balance;

cout

getch();

}

void bank::viewacc()

{

cout

cout

cout

cout

cout

}

void createacc();

void login();

void manageacc(int);

/* MAIN PROGRAM */

void main()

{

int op;

/* ADMIN AREA */

do{

clrscr();

cout

cout

cout

cin>>op;

switch(op)

{

case 1: createacc(); break; //creates account

case 2: login(); break; //login to user areacase 0: cout

default: cout

}

}while(op>0);

}

void createacc()

{

int n;

clrscr();

cout

cin>>n;

for(int i=0; i

{

cout

c[i].openacc();

}

}

void login() //LOGIN BY A/C NO

{

clrscr();

long int ac;

int flag=0;

cout

cin>>ac;

for(int i=0; i

{

if(ac==c[i].returnacc())

{

manageacc(i);

flag=1;

}

}

if(flag==0) cout

}

void manageacc(int i)

{

int op;

clrscr();

/* USER AREA */

cout

cout

cout

do{

cout

cin>>op;

switch(op){

case 1: c[i].deposit(); break;

case 2: c[i].withdraw(); break;

case 3: c[i].transfer(); break;

case 4: c[i].viewacc(); break;

case 0: cout

getch(); break;

default: cout

}

cout

}while(op>0);

}

}

Place Order
Grab A 14% Discount on This Paper
Pages (550 words)
Approximate price: -
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Try it now!

Grab A 14% Discount on This Paper

Total price:
$0.00

How it works?

Follow these simple steps to get your paper done

Place your order

Fill in the order form and provide all details of your assignment.

Proceed with the payment

Choose the payment system that suits you most.

Receive the final file

Once your paper is ready, we will email it to you.