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
Which computer peripheral is used when you would like to use a DVD or CD?
bulgar [2K]

Answer:dvd

Explanation:

4 0
3 years ago
Read 2 more answers
X = 9 % 2<br><br> if (x == 1):<br>   print ("ONE")<br> else:<br>   print ("TWO")
Alex73 [517]
The output will be : ONE
5 0
3 years ago
Read 2 more answers
Nilsu is attempting to train a new administrative assistant on using a word processing program. Since the program is fairly comp
tatiyna

Answer:

teach the assistant bits and pieces of the program.

Explanation:

Given that the program is fairly complex and has many independent components, the most ideal way Nilsu should train a new administrative assistant on using a word processing program is by "teaching the assistant bits and pieces of the program."

This will make the administrative assistant understand and operate the program at a gradual pace without anhthing looking confusing.

5 0
3 years ago
What is meant by saving a sheet document​
Zina [86]

Answer:

While you'll use Save or press Ctrl+S to save an existing workbook in its current location, you need to use Save As to save your workbook for the first time, in a different location, or to create a copy of your workbook in the same or another location.

5 0
3 years ago
Every windows service has the 3 start types what are those service types?
spayn [35]

Answer:

You can stop, pause, start, delay start, or resume each service as appropriate. You can also modify the start mechanism (Manual or Automatic) or specify an account. Windows Services broadly fall into three categories depending on the actions and applications they control: Local Services, Network Services and System.

5 0
3 years ago
Other questions:
  • A sample containing 4.30 g of O2 gas has an initial volume of 13.0 L. What is the final volume, in liters, when each of the foll
    5·1 answer
  • which of the following information technology career fields generally requires the lowest level of education for an entry level
    9·1 answer
  • 80 points two simple computer questions
    13·2 answers
  • Using C#, declare two variables of type string and assign them a value "The "use" of quotations causes difficulties." (without t
    11·1 answer
  • FOR 15 POINTS AND BRAINLIEST!<br> What are the possible consequences of Invasion of privacy?
    8·1 answer
  • Identify which statement explains why a programmer would break a logic problem into steps.
    13·2 answers
  • viewRatings(string, int) Takes a username and a minimum rating value. It prints all the books that the user has rated with a val
    10·1 answer
  • Which fund classification would a focus on only stocks of technology companies match?
    10·1 answer
  • In this program you will read in the number of seconds and convert it to days, hours, minutes and remaining seconds.
    8·1 answer
  • __________ translates analog voice signals into digital data and uses the Internet to transport the data.
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!