Write a program to display concrete class concept in C++
Subject - Computer Science with C++
Class - 12th
Answers
Answer:
#include <iostream>
#include <string>
using namespace std;
class Abstract {
private:
string info;
public:
virtual void printContent() = 0;
};
class Concrete {
private:
string info;
public:
Concrete(string s) : info(s) { }
void printContent() {
cout << "Concrete Object Information\n" << info << endl;
}
};
int main()
{
string s;
s = "Object Creation Date : 22:33 PM 04 Nov 2019";
Concrete c(s);
c. printContent()
Answer:
\bf{\Large{\underline{\bf{To\:Find\::}}}}
ToFind:
The total Interest.
\bf{\Large{\underline{\tt{\pink{Explanation\::}}}}}
Explanation:
\blacksquare\:■ According to the question :
\leadsto\sf{Time\:=\:\dfrac{24\cancel{0}}{36\cancel{0}} \:years}⇝Time=
36
0
24
0
years
\leadsto\sf{Time\:=\:\cancel{\dfrac{24}{36}} \:years}⇝Time=
36
24
years
\leadsto\sf{\purple{Time\:=\:\dfrac{2}{3}\:years}}⇝Time=
3
2
years
\bf{\Large{\boxed{\rm{Formula\:of\:the\:Simple\:Interest\:(S.I.)}}}}
FormulaoftheSimpleInterest(S.I.)
\implies\sf{S.I.\:=\:\dfrac{P*R*T}{100} }⟹S.I.=
100
P∗R∗T
\implies\sf{S.I.\:=\:\dfrac{12500*5*\dfrac{2}{3} }{100} }⟹S.I.=
100
12500∗5∗
3
2
\implies\sf{S.I.\:=\:\dfrac{125\cancel{00}*5*2}{\cancel{100}*3} }⟹S.I.=
100
∗3
125
00
∗5∗2
\implies\sf{S.I.\:=\:\dfrac{125*5*2}{3} }⟹S.I.=
3
125∗5∗2
\implies\sf{S.I.\:=\:\dfrac{1250}{3} }⟹S.I.=
3
1250
\implies\sf{S.I.\:=\:\cancel{\dfrac{1250}{3}} }⟹S.I.=
3
1250
\implies\sf{\purple{S.I.\:=\:Rs.416.66}}⟹S.I.=Rs.416.66
Thus,
The total Interest cost is Rs.416.66.