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
And then what happened,Paul Revere rhyme
Mamont248 [21]
Wat? Well, huh I don't understand the question
6 0
3 years ago
Read 2 more answers
In the following nested loop structure, which loop does the program EXIT first?
EleoNora [17]

Answer:

C

Explanation:

4 0
3 years ago
Select the correct answer.
VladimirAG [237]

Answer:

B. cloud technology

Explanation:

There are various ways to make this possible but the best way would be using cloud technology. This would allow the entire media application to run on a server somewhere else and have the images and inputs completely streamed to and from the user's device. This allows the application to be able to run on any device that the user may have and even start on one device and transfer over to another while still having all your information and data saved and usable on each device.

6 0
3 years ago
Mention<br>any<br>5<br>indicators of<br>happiness​
Maru [420]

Answer:

5 indicators of happiness that might surprise you · Happiness is deep · Happy is busy · Can't buy me happiness · The happiness gene · No regrets.

Explanation:

5 0
3 years ago
Read 2 more answers
How many answers do you need to be able to write messages on here??
Kipish [7]

1,000

Hope this helps!



~Courtney

3 0
3 years ago
Other questions:
  • You would like to set up an online meeting to communicate with colleagues on a group project. Which of these tools should you su
    9·1 answer
  • In step 2 of the mail merge process you must be prepared to
    6·2 answers
  • How can i complain a rude comment
    7·1 answer
  • What was one of the first inventions that made it possible to communicate almost instantly?
    11·1 answer
  • Advertising is organized around four distinct groups. The _____ group includes the photographers, the illustrators, video produc
    9·1 answer
  • In 2d design, form makes what possible?
    15·1 answer
  • What icons in the toolbar change the look of the presentation text? It’s either Drawing, Formatting,Presentation, or Standard
    9·2 answers
  • Your network has four Hyper-V hosts, which are running three domain controllers and about 10 member servers. Three of the member
    10·1 answer
  • Ano ang ibig sabihin ng tanka<br>​
    5·1 answer
  • 8. Give regular expressions with alphabet {a, b} for
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!