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]
2 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]2 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
Press the _______ key to move to the next cell in a row.
swat32
I believe it's
C. Tab
7 0
2 years ago
Read 2 more answers
Managing your calendar and emails can be easily accomplished through ___ software
r-ruslan [8.4K]
<span>Managing your calendar and emails can be easily accomplished through personal information management software.
These types of software can deal with your personal information, such as meetings, calendar appointments, etc. 
</span>
6 0
3 years ago
How do you get banned? By getting reported? Or do admins watch whats posted?
Andrew [12]
By mostly getting reported by people 

4 0
2 years ago
Rob Janoff believes that technology should not be used too
goldenfox [79]

Answer:

Rob Janoff made that statement in relation to cerebrating or trying to create an idea. Being a graphic artist, it may not be out of place to also assume he was speaking as an artist.

He believes that some of the new technologies do not allow for the free flow of ideas as old-fashioned hand sketching would.

A psychologist MAY disagree to say that he only feels that way because he has high Kinaesthetic Intelligence which is the ability to use one's body with great precision.

Cheers!

6 0
2 years ago
Describe two ways in which an organizer can assist in taking notes
FromTheMoon [43]

There are two ways in which an organizer can assist in taking notes:

1. It helps one make connections between different topics. (concept maps are really good for this)

2. It allows one to identify the main topics and subtopics. (outlines are great for this purpose)

6 0
2 years ago
Read 2 more answers
Other questions:
  • What is the other name of the horizontal column graph?
    6·2 answers
  • Why ois my printer not printing pictjures?
    9·1 answer
  • You are in charge of designing a menu tree for navigating 1,250 books in a digital library. Present an argument of whether the m
    12·1 answer
  • Which steps would you take to determine how much an employee should be paid? Select all that apply.
    9·1 answer
  • In the written Hawaiian language, only 13 letters are used: the five vowels (a,e,i,o, and u), and 8 consonants (h,k,l,m,n,p,w, a
    10·1 answer
  • You are creating a presentation and you have come to the last slide. You still have more information to add. What should you do?
    7·1 answer
  • Research for a project should be based on?
    7·2 answers
  • Make a list of five primary raw materials, for each one, indicate and industrial material that is created from it
    10·2 answers
  • - O conhecimento na Educação Física, normalmente passa do senso comum e vai para um conhecimento mais formal, ou seja, do conhec
    7·1 answer
  • How many answer can you get daily
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!