aboutsummaryrefslogtreecommitdiff
path: root/main.cpp
diff options
context:
space:
mode:
authorLibravatar SR Tamim <saifur.rahman.tamim1@gmail.com>2024-03-07 10:05:41 +0600
committerLibravatar SR Tamim <saifur.rahman.tamim1@gmail.com>2024-03-07 10:05:41 +0600
commit48110b812253975b6e2437fef07b84dd7382db9e (patch)
tree1ea043569604280ca8f10bb5811871a8f3c9dbbb /main.cpp
parentd9f58439b81b2505456c05dc2e64864b1cbcfde2 (diff)
downloadentropy-calc-48110b812253975b6e2437fef07b84dd7382db9e.tar.gz
entropy-calc-48110b812253975b6e2437fef07b84dd7382db9e.zip
total heat needed & entropy change
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/main.cpp b/main.cpp
index f9e2c38..6b6fa8e 100644
--- a/main.cpp
+++ b/main.cpp
@@ -1,13 +1,13 @@
#include <iostream>
#include <vector>
#include "headers/allElements.h"
-#include "headers/genericElement.h"
+#include "headers/baseElement.h"
using namespace std;
int main()
{
- vector<genericElement*> elements = getAllElements();
+ vector<baseElement*> elements = getAllElements();
cout << "Choose an element: " << endl;
for (int i = 0; i < elements.size(); i++)
{
@@ -26,5 +26,7 @@ int main()
cout << "Enter the final temperature of the element (in K): ";
cin >> toTemp;
+ cout << "The total heat needed is: " << elements[choice - 1]->totalHeatNeeded(mass, fromTemp, toTemp) << " J" << endl;
+
cout << "The total entropy change is: " << elements[choice - 1]->totalEntropyChange(mass, fromTemp, toTemp) << " J/K" << endl;
}