Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

#include <iostream> #include <string> #include \"ResistorChrisBaker.h\" using na

ID: 3649154 • Letter: #

Question

#include <iostream>
#include <string>
#include "ResistorChrisBaker.h"
using namespace std;

int main( )
{
cout << "Creating a resistor R1 = 3.4kOhms & 20% Tolerance " << endl;
ResistorClass firstR(3400, 20, "R1");
firstR.setnominalResistance(3400);
firstR.settolerance(20);
firstR.setname("R1");
cout << "Testing the display function for firstR. " << endl;
firstR.displaynominalResistance( );
firstR.displaytolerance( );
firstR.displayname( );
cout << "Testing the get functions for firstR. " << endl;
cout << "getname = " << firstR.getname() << endl;
cout << "getnominalResistance = " << firstR.getnominalResistance() << endl;
cout << "getTolerance = " << firstR.gettolerance() << endl;
cout << "Testing the MaximumR function for firstR. " << endl;
cout << "Max. Resistance = " << firstR.maximumR() << endl;
cout << "Testing the Minimum function for firstR. " << endl;
cout << "Min. Resistance = " << firstR.minimumR() << endl;
cout << "Testing the set functions for firstR and changing it to: " << endl;
firstR.setnominalResistance(150);
firstR.settolerance(10);
firstR.setname("R5");
cout << "R5 = 1.5 Ohms & tolerance 10%, expect minimum resistance value = 1.35. " << endl;
firstR.displaynominalResistance( );
firstR.displaytolerance( );
firstR.displayname( );
cout << "Max. Resistance = " << firstR.maximumR() << endl;
cout << "Min. Resistance = " << firstR.minimumR() << endl;


cout << "Press ENTER key to exit" << endl;
cin.ignore( );
return 0;
}





hese errors:

error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup
.LNK1120: 1 unresolved externals

Explanation / Answer

Programme codeis alright. Change the headers to #include and #include