1 e/* SavingsAccount.h * Header file for SavingsAccount class * efile SavingsAccount.h @author Javaria Basit * This file SavingsAccount.h consist of class SavingsAccount and it is a private class * This is also a drived class for the base class BankAccount 8 #ifndef SAVINGSACCOUNT_H #define SAVINGSACCOUNT H #include "BankAccount.h" using namespace std; 3 oclass SavingsAccount:public BankAccount { private: double interest_rate; double nin_balance; public: SavingsAccount(); SavingsAccount(string, double,double); void withdraw(double); void set_interest rate(double); double get_interest_rate(); void display balance(); void nonth_end(); ); #endif
OOPs
In today's technology-driven world, computer programming skills are in high demand. The object-oriented programming (OOP) approach is very much useful while designing and maintaining software programs. Object-oriented programming (OOP) is a basic programming paradigm that almost every developer has used at some stage in their career.
Constructor
The easiest way to think of a constructor in object-oriented programming (OOP) languages is:
i need documentation for class objects
#ifndef SAVINGSACCOUNT_H
#define SAVINGSACCOUNT_H
#include "BankAccount.h"
#include <iostream>
using namespace std;
class SavingsAccount : public BankAccount
{
private:
double interest_rate;
double min_balance;
public:
SavingsAccount();
SavingsAccount(string, double,double);
void withdraw(double);
void set_interest_rate(double);
double get_interest_rate();
void display_balance();
void month_end();
};
Step by step
Solved in 3 steps