Question: mp4 CIS 180 Lab 03 Coding through Pseudocode In this lab you are going to create a program that will calculate the cost of

mp4 CIS 180 Lab 03 Coding through Pseudocode In this lab you are going to create a program that will calculate the cost of running an electric device for some period of time. Be sure to read through the instructions COMPLETELY before beginning. Description of the Program: This program will need to obtain the following information from the user: The voltage coming from the outlet (Example: 120 volts and 240 volts are common, but allow them to pick whatever they want). Do not worry about negative values, if they enter it in, that's on them (for now....). The amperage (in amp) that the device uses while on. The cost the utility company charges per kilowatt hour. The number of minutes each day the device is on. The number of days the user would like to project the cost to. (Project sounding like projector) Based on this information program will calculate the following: Wattage/Watts (formula: wattage = amperage * voltage) Kilowatts (convert from watts above, using knowledge of metric system units) Kilowatts used per day (kilowatts* hours per day the device is on) Total Cost per day (Kilowatts used per day * The cost the utility company charges per kilowatt hour) Total Cost During the Projected Period (Total Cost per days * The number of days the user would like to project the cost to) The program should then display these calculate values to the user, remembering that money should only have 2 decimal places. 1. As you did with the previous weeks lab, create a new project (give it an appropriate name like Lab03), and create a new java class (give it an appropriate name like Power Consumption Analyzer). 2. Before you get started coding, create a separate text document called "Lab 03 Pseudocode.txt" (you can do this in Eclipse, or use Notepad). Be sure to include your name, date, and a description of the program. 3. Using your own words, in the best English sentences you can muster, start to outline every step that will lead to the goal. This is akin to the recipe analogy: you need to write down the steps that will bake the cake. The benefit of writing the steps in your own words is that you don't need to get hung up on the coding aspect just yet. Avoid using words like "and" and "then". These words may indicate that you have rolled right into what should be another, separate, step. Example: Bad Step 2: Mix the flour with 2 eggs and stir for 5 minutes, then let sit for 10 minutes. Good Step 2: Mix the flour with 2 eggs. Step 3: Stir for 5 minutes. Step 4: Let sit for 10 minutes. 4. Once you are complete with this document, have the TA look it over to give you the go-ahead to start going with this "Recipe" you have created. Oh, by the way, this is what we call Pseudocode. 5. Before you start coding, copy the pseudocode to your java file and convert them to comments. The name, date, and program description should go at the top of your java files, while all the steps should go inside the main method. 6. Now using these comments as guidelines, you may start coding. Be sure to only code as much as you need to get to a place where you can run and test the program. Incremental progress is important to weed out errors. 7. Use double for all variables except for days, which should use int (we don't want fractional days, only whole days). 8. If you believe you have completed this portion of the lab, have the TA check you off. Once you are checked off for all portions, upload both "Lab 03 Pseudocode.txt" and the .java source code file to myCourses.
Step by Step Solution
3.44 Rating (167 Votes )
There are 3 Steps involved in it
Heres an example of how the pseudocode for the program could be structured livecodeserver Copy Progr... View full answer
Get step-by-step solutions from verified subject matter experts
