Git Product home page Git Product logo

demo's Introduction

Demo

This repository is a representation of clonning

#include #include #include #include #include <stdio.h> using namespace std;

class Bank { string name, address; char acc_type; float balance;

public: void open_account(); void deposit_money(); void withdraw_money(); void display_account(); };

// Function to open the account void Bank::open_account() { name = "Vansh"; cout << "Enter your full name: " << name << endl; address = "Mohali"; cout << "Enter your address: " << address << endl; acc_type = 'S'; cout << "What type of account you want" << " to open saving(S) or Current(C): " << acc_type << endl; balance = 8000; cout << "Enter How much money you want to deposit: " << balance << endl; cout << "Account Created Successfully"; }

// Function to deposit the account void Bank::deposit_money() { int Amount; Amount = 9500; cout << "Enter how much money" << " you want to deposit: " << Amount << endl; balance += Amount; cout << "\n Available Balance: " << balance; }

// Function to display the account void Bank::display_account() { cout << "Name: " << name << endl << "Address: " << address << endl << "Type: " << acc_type << endl << "Balance: " << balance << endl << endl; }

// Function to withdraw the account void Bank::withdraw_money() { float amount; amount = 3200; cout << "Enter how much money " << "you want to withdraw: " << amount << endl; balance -= amount; cout << "\n Available balance: " << balance; }

// Driver code int main() { int choice;

// Creating Customer Object of Bank Class
Bank customer;

cout << "\n1) Open account \n\n";
// Calling open_account() function
// through customer object.
customer.open_account();
cout << "\n------------------------"
	<< "-------------------------\n";

cout << "\n2) Deposit account \n\n";
// Calling deposit_money() function
// through customer object.
customer.deposit_money();
cout << "\n------------------------"
	<< "-------------------------\n";

cout << "\n2) Withdraw money \n\n";
// Calling withdraw_money() function
// through customer object.
customer.withdraw_money();
cout << "\n------------------------"
	<< "-------------------------\n";

cout << "\n4) Display Account \n\n";
// Calling display_account() function
// through customer object.
customer.display_account();
cout << "\n------------------------"
	<< "-------------------------\n";

return 0;

}

Second commit:) Third commit:)

demo's People

Contributors

vanshbhargava avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

vanshbhargava11

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.