1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
LekaFEV [45]
3 years ago
14

There Are Two Programs in this Question who will attempt first i will give brainliest ans reward and big points:-

Computers and Technology
1 answer:
Korolek [52]3 years ago
4 0

Answer:

here you go ,could only do Question 2.try posting question 1 seperately maybe someone else can also try to help

Explanation:

Question 2.

#include <iostream>

using namespace std;

// class BankAccount

class BankAccount{

  

    // instance variables

    private:

        int accountID;

        int balance;

  

    public:

      

        // constructor

        BankAccount(int accountID, int balance){

            this->accountID = accountID;

            this->balance = balance;

        }

      

        // getters and setters

        void setAccoutnId(int accountID){

            this->accountID = accountID;

        }

      

        int getAccountId(){

            return accountID;

        }

      

        void setBalance(int balance){

            this->balance = balance;

        }

      

        int balanceInquiry(){

            return balance;

        }

};

class CurrentAccount : public BankAccount{

  

    public:

  

        // constructor

        CurrentAccount(int accountID, int balance):BankAccount(accountID,balance){

          

        }

      

        // function amount to withdraw

        void amountWithdrawn(int amount){

            setBalance(balanceInquiry()-amount);

        }

      

        // function to deposit amount

        void amountDeposit(int amount){

            setBalance(balanceInquiry()+amount);

        }

};

class SavingsAccount : public BankAccount{

  

    public:

      

        // constructor

        SavingsAccount(int accountID, int balance):BankAccount(accountID,balance){

          

        }

  

        // function amount to withdraw

        void amountWithdrawn(int amount){

            setBalance(balanceInquiry()-amount);

        }

      

         // function to deposit amount

        void amountDeposit(int amount){

            setBalance(balanceInquiry()+amount);

        }

      

      

};

int main()

{

    // calling function of Current Account

    cout<<"Current Account : "<<endl;

    CurrentAccount current(122,100000);

    current.amountWithdrawn(10000);

    cout<<"Your balance after withdraw : ";

    cout<<current.balanceInquiry()<<endl;

    current.amountDeposit(30000);

    cout<<"Your balance after deposit : ";

    cout<<current.balanceInquiry()<<endl;

    cout<<endl<<endl;

  

    // calling function of Savings Account

    cout<<"Savings Account : "<<endl;

    SavingsAccount saving(125,80000);

    saving.amountWithdrawn(5000);

    cout<<"Your balance after withdraw : ";

    cout<<saving.balanceInquiry()<<endl;

    saving.amountDeposit(20000);

    cout<<"Your balance after deposit : ";

    cout<<saving.balanceInquiry();

    return 0;

}

You might be interested in
Authenticating information can be something a user knows, like a password; something a user has, like a smart card; or something
xenn [34]

Answer:. True

Explanation:

yes it is true in my opinion

8 0
2 years ago
Jensen is a senior developer for Hackers R'Us, a company that helps secure management information systems. Jensen's new task is
Harlamova29_29 [7]

Answer:

b. white-hat hacker

Explanation:

A White-hat Hacker, also known as an Ethical Hacker is an information security specialist, known for performing penetration testing and checks in search for information and communications system's vulnerabilities on demand for his/her clients.

These efforts are meant to find security risks before someone else does, who could cause any kind of damage to the systems or unauthorized access to sensitive information

6 0
3 years ago
You can post a Facebook status update from your smartphone. True or false?
Nady [450]
True .................
3 0
3 years ago
Read 2 more answers
The parts of a memo are _____.
Alex
The correct answer would be D
4 0
3 years ago
Read 2 more answers
Insurance can help you:a. minimize monthly expenses
KIM [24]
This is an easy answer sure in the back of your mind u knew it was b good luck :).

4 0
3 years ago
Other questions:
  • To create a new folder, press ____.
    12·1 answer
  • How to stay organized in an online school?
    7·1 answer
  • __________ is a program that lets you share documents online with others.
    12·2 answers
  • After clicking the Start button on your computer screen desktop, what option would you then select to examine system components
    15·1 answer
  • ________ are chunks of software - installed on one's computer, tablet, or smartphone - that are gateways to games, online resour
    8·1 answer
  • Blender is used by which video game team member?
    15·1 answer
  • -) An attribute is a(n)?
    5·1 answer
  • Pls help I don’t know the answers
    15·1 answer
  • Who has more Tanks? Russia or USA? You get ti right and you get BRAINLIEST
    12·2 answers
  • after adding a sound to a slide, the audio tools tab will allow you to apply artistic effects and quick styles to your sound ico
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!