CIS170C WEEK 3 PROJECT-IPO CHART.docx

30 July, 2024 | 2 Min Read

CIS170C – July 2021

Course Project – Week 3

IPO Chart

PSEUDO CODE

Start

Output ā€œWhat is the length of aluminum wire needed:ā€ Input aluminumLength

Output ā€œWhat is the Gauge of aluminum wire needed:ā€

Input aluminumGauge If current is <= 20amps

Then aluminumGauge = 12awg

Else aluminumGauge = 3awg

Output ā€œWhat is the length of copper wire needed:ā€ Input copperLength

Output ā€œWhat is the Gauge of copper wire needed:ā€

Input copperGauge If current is <= 25amps

Then copperGauge = 8awg

Else copperGauge = 4awg

Output ā€œHow many hours of labor?:ā€

Input laborHours

Set totalLabor = (laborHour * aluminumLength) + (laborHour * copperLength)

Set totalMaterials = (aluminumLength *1) + (copperLength * 2)

Set totalCost = totalMaterial + totalLabor

Stop

CODE

#include < iostream >

#include < iomanip > using namespace std;

int main()

{ cout << “Electrical Bid Calculator” << endl; cout << endl;

double totalCost, totalLabor, totalMaterial;

int alumiLength, coppLength, alumiGauge, coppGauge, laborHour, alumiCurrent, coppCurrent;

cout <<“Enter Amps need for Aluminum Wire: “; cin » alumiCurrent;

if (alumiCurrent <= 20)

{

alumiLength = 15; alumiGauge = 12;

cout <<“Gauge needed is: " << alumiGauge;

}

else

{

alumiLength = 15; alumiGauge = 3;

cout <<“Gauge needed is: " << alumiGauge;

}

cout << endl;

cout <<“Enter Amps needed for Copper Wire: “; cin » coppCurrent;

if (coppCurrent <= 25)

{

coppLength = 15; coppGauge = 8;

cout <<“Gauge needed is: " << coppGauge;

}

else

{

coppLength = 15; coppGauge = 4;

cout <<“Gauge needed is: " << coppGauge;

}

cout << endl;

cout <<“How many hours of estimated Labor?:"; cin » laborHour;

cout <<"\nYour minimum Length of Aluminum is:\t” << alumiLength << “feet”; cout <<"\nYour minimum Length of Copper is:\t” << coppLength << “feet”;

cout << endl;

cout <<"\nEstimate of cost shown below:\n”; cout <<"—————————–\n”; totalMaterial = ( alumiLength * 1 ) + ( coppLength * 2 ); totalLabor = ( laborHour * alumiLength ) + (laborHour * coppLength); totalCost = totalMaterial + totalLabor; cout << endl;

cout << “Total Cost of Labor:\t\t$” << " " << totalLabor << endl; cout << “Total Cost of Materials:\t$” << " " << totalMaterial << endl; cout << “Total Cost of Electrical Job:\t$” << " " << totalCost << endl; }

Related posts