-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfixeddeposit.cpp
More file actions
55 lines (41 loc) · 773 Bytes
/
fixeddeposit.cpp
File metadata and controls
55 lines (41 loc) · 773 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/*
* fixed.cpp
*
* Created on: 11-Mar-2020
* Author: sunbeam
*/
#include<iostream>
#include "investment.h"
#include "fixeddeposit.h"
using namespace std;
fixeddeposit::fixeddeposit()
{
this->amount = 0.0;
}
fixeddeposit::fixeddeposit(float amount)
{
this->amount = amount;
}
float fixeddeposit::getAmount() const {
return amount;
}
void fixeddeposit::setAmount(float amount) {
this->amount = amount;
}
void fixeddeposit::acceptamount()
{
cout<<"enter amount"<<endl;
cin>>amount;
}
void fixeddeposit::displayamount()
{
cout<<"total balance is"<<this->amount<<endl;
}
float fixeddeposit::totalinvestment()
{
return this->amount = (this->amount * 0.01)+(this->amount);
}
float fixeddeposit::maturity()
{
return this->totalinvestment()*5.0;
}