-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsharemarket.cpp
More file actions
55 lines (41 loc) · 791 Bytes
/
sharemarket.cpp
File metadata and controls
55 lines (41 loc) · 791 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
/*
* sharemarket.cpp
*
* Created on: 11-Mar-2020
* Author: sunbeam
*/
#include<iostream>
#include "investment.h"
#include "sharemarket.h"
using namespace std;
sharemarket::sharemarket()
{
this->amount =0.0;
}
sharemarket::sharemarket(float amount)
{
this->amount = amount;
}
float sharemarket::getAmount() const {
return amount;
}
void sharemarket::setAmount(float amount) {
this->amount = amount;
}
void sharemarket::acceptamount()
{
cout<<"enter amount"<<endl;
cin>>amount;
}
void sharemarket::displayamount()
{
cout<<"total balance is"<<this->amount<<endl;
}
float sharemarket::totalinvestment()
{
return this->amount = ((this->amount * 0.016)+(this->amount)-(0.02*this->amount));
}
float sharemarket::maturity()
{
return this->totalinvestment()*5.0;
}