NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

#include <iostream>
#include <fstream>
#include <cctype>
#include <iomanip>
#include <windows.h>

using namespace std;

class account{
int accnumber;
char name[30];
double deposit;
char type;
public:
void create_account();
void show_account() const;
void modify();
void dep(int);
void draw(int);
void report () const;
void retaccnumber() const;
void retdeposit()const;
void rettype() const;
};

void account::create_account(){
cout<<"Please put your account number"<<endl;
cin>>accnumber;
cout<<"Please put your name"<<endl;
cin.ignore();
cin.getline(name,50);
cout<<"Please put your account type (C/D)"<<endl;
cin>>type;
type=toupper(type);
cout<<"Please put your ammount bigger than 5000"<<endl;
cin>>deposit;
cout<<"Account Created Succesfully"<<endl;
cout<<"***************************"<<endl;
}
void account::show_account(){
cout<<"Account Number is"<<accnumber<<endl;
cout<<"The person Who has this account is:"<<name<<endl;
cout<<"Type of the account is:"<<type;
cout<<"The deposit ammount is:"<<deposit;
}
void account::modify(){
cout<<"Put your account number"<<accnumber<<endl;
cout<<"Put your name"<<name<<endl;
cin.ignore();
cin.getline(name,50);
cout<<"Modify your account Type"<<endl;
cin>>type;
type=toupper(type);
cout<<"Modify your deposit ammount"<<endl;
cin>>deposit;
}
void account::dep(int x){
deposit=deposit+x;
}
void account::draw(int x){
draw=draw-x;
}
void account::report() const
{
cout<<acno<<setw(10)<<" "<<name<<setw(10)<<" "<<type<<setw(6)<<deposit<<endl;
}
void account::retaccnumber()const
{
return accnumber;
}
void account::retdeposit()const{
return deposit;
}
void account::rettype()const{
return type;
}

void write_account(); //function to write record in binary file
void display_sp(int); //function to display account details given by user
void modify_account(int); //function to modify record of file
void delete_account(int); //function to delete record of file
void display_all(); //function to display all account details
void deposit_withdraw(int, int); // function to desposit/withdraw amount for given account
void intro(); //introductory screen function

int main(){

int num;
char ch;
intro();
do{
system("cls");
cout<<"Bank of Albania"<<endl;
cout<<"1.Create new account"<<endl;
cout<<"2.Deposit"<<endl;
cout<<"3.Withdraw Money"<<endl;
cout<<"4.Balance of Money"<<endl;
cout<<"5.All Account Holder List"<<endl;
cout<<"6.Close an account"<<endl;
cout<<"7.Modify an account"<<endl;
cout<<"8.Exit Program"<<endl;
switch(ch){
case '1':
write_account();
break;
case '2':
cout<<"nntEnter The account No. : "; cin>>num;
deposit_withdraw(num, 1);
break;
case '3':
cout<<"nntEnter The account No. : "; cin>>num;
deposit_withdraw(num, 2);
break;
case '4':
cout<<"nntEnter The account No. : "; cin>>num;
display_sp(num);
break;
case '5':
display_all();
break;
case '6':
cout<<"nntEnter The account No. : "; cin>>num;
delete_account(num);
break;
case '7':
cout<<"nntEnter The account No. : "; cin>>num;
modify_account(num);
break;
case '8':
cout<<"nnt**Thank You For Visiting Our Bank**";
break;
default :cout<<"a";
}
cin.ignore();
cin.get();
}while (ch!='8');
return 0;
}
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.