Question: Which function is most appropriate to improve the given code? Flowchart Main has 1 0 float variables ( powerConsumptionApp 1 , powerConsumptionApp 2 , powerConsumptionApp
Which function is most appropriate to improve the given code?
Flowchart Main has float variables powerConsumptionApp powerConsumptionApp powerConsumptionApp hoursOfUse hoursOfUse hoursOfUse energyPerDay energyPerDay energyPerDay totalEnergyConsumed and nodes. Node is the start node and points to node Node code: powerConsumptionApp Node points to node Node code: hoursOfUse Node points to node Node code: energyPerDaypowerConsumptionApp hoursOfUse Node points to node Node code: powerConsumptionApp Node points to node Node code: hoursOfUse Node points to node Node code: energyPerDaypowerConsumptionApp hoursOfUse Node points to node Node code: powerConsumptionApp Node points to node Node code: hoursOfUse Node points to node Node code: energyPerDaypowerConsumptionApp hoursOfUse Node points to node Node code: totalEnergyConsumed energyPerDay energyPerDay energyPerDay Node points to node Node puts to output the string: The total energy consumed per day is Node points to node Node code: Put totalEnergyConsumed to output Node points to node Node puts to output the string:
Node points to node Node is the end node.
a
Flowchart ComputeTotal has parameter variables float energyPerDay float energyPerDay float energyPerDay return variable float total and nodes. Node is the start node and points to node Node code: total energyPerDay energyPerDay energyPerDay Node points to node Node is the end node.
b
Flowchart InputValues has parameter variables float power, float hoursno return variable, and nodes. Node is the start node and points to node Node code: power Get next input Node points to node Node code: hours Get next input Node points to node Node is the end node.
c
Flowchart ComputeEnergyConsumed has parameter variables float power, float hours return variable float energy and nodes. Node is the start node and points to node Node code: energy power hours Node points to node Node is the end node.
d
Flowchart PrintPowerConsumed has parameter variable float totalEnergyConsumed no return variable, and nodes. Node is the start node and points to node Node code: Put totalEnergyConsumed to output Node points to node Node puts to output a newline Node points to node Node is the end node.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
