mp4 CIS 180 Lab 03 Coding through Pseudocode In this lab you are going to create...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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. 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.
Expert Answer:
Answer rating: 100% (QA)
Solutions Step 1 I can help you outline the pseudocode for your CIS 180 Lab 03 program Heres a stepbystep breakdown of the program in pseudocode Program PowerConsumptionAnalyzer Description This progr... View the full answer
Related Book For
Modern Systems Analysis And Design
ISBN: 9780134204925
8th Edition
Authors: Joseph Valacich, Joey George
Posted Date:
Students also viewed these programming questions
-
Our primary job's gross income is $3,468.73/month. Deductions are FICA (7.65%), federal tax withholding (11.5%), and state tax withholding (7.8%). How much are your fixed expenses if they are 36% of...
-
The Taylor polynomial for sin(x) for a near 0 to order 5 is 1 1 sin(x) = x - + -x +0(x7) 6 120 The figure below shows a plot of sin(x) [blue] and the above Taylor polynomial [red]. 0.8 0.6 0.4 0.2 1...
-
List three specific parts of the Case Guide, Objectives and Strategy Section (See below) that you had the most difficulty understanding. Describe your current understanding of these parts. Provide...
-
Solve each compound inequality. Graph the solution set, and write it using interval notation. -2x +1> -11 or x+1> 10
-
Two narrow parallel slits separated by 0.850 mm are illuminated by 600-nm light, and the viewing screen is 2.80 m away from the slits. (a) What is the phase difference between the two interfering...
-
Two genes, designated A and B, are located 10 mu from each other. A third gene, designated C, is located 15 mu from B and 5 mu from A. The parental generation consisting of AA bb CC and aa BB cc...
-
The numbers of tornadoes by state in 2016 are listed. (a) Draw a box-and-whisker plot that represents the data set (b) describe the shape of the distribution. 87 0 3 23 7 45 0 1 50 40 46 99 0 0 48 27...
-
The earning of revenue by a business enterprise is recognized for accounting purposes when the transaction is recorded. In some situations, revenue is recognized approximately as it is earned in the...
-
How much would $ 1 , growing at 8 . 6 5 % per year, be worth after 8 5 years?
-
Consider the pendulum shown in Figure 1, where & denotes the length of the rod and m denotes the mass of the bob. We assume the rod is rigid and has zero mass. The pendulum is actuated by a DC motor...
-
Compare the policy ideas of President Herbert Hoover and President Franklin D. Roosevelt during the Great Depression. How did the role of the federal government change under President Franklin D....
-
Describe the use of Java in the first Intel version of the Solaris Operating system by Sun Microsystems (now Oracle) ?
-
Define an operating system. What are the most widely used operating systems today? What is the function of an operating system? What operating systems are used on mobile devices? Which operating...
-
Some have interpreted Solaris' ocean as a metaphor for consciousness. Do you agree with this interpretation? Explain. ( Andrei Tarkovsky's film Solaris)
-
Below are ten functions. Find the first derivative of each. Space is provided. Use good dark ink if you are returning this by a scanned version. All of the derivatives can be found by using...
-
Compare and contrast the implementations of the threads in Windows, Mac OS and LINUX.
-
Madison Company reported net income of $100,000 for the year ended December 31, 2013. During the year, inventories decreased by $12,000, accounts payable decreased by $18,000, depreciation expense...
-
Outline a general process applicable to most control situations. Using this, explain how you would develop a system to control home delivery staff at a local pizza shop.
-
Describe several input devices for interacting with a system. Is one device better than all others? Why or why not?
-
In what ways is a request to change an information system handled differently from a request for a new information system?
-
You read in this chapter about the advantages of client/server architectures. What operational and management problems can be created by client/server architectures? Considering both the advantages...
-
The Current Better Life Survey (https://www.oecdbetterlifeindex.org) is used by the Organization for Economic Co-operation and Development (OECD) to assign Better Life Indices, calculated through...
-
During the spring semester in 2014, an ebook survey was administered to students at Winthrop University. Of the 170 students sampled, 45% indicated that they had used ebooks for their academic work....
-
Suppose a student is interested in knowing the preferred holiday destinations of the faculty members in their university. They are affiliated to the college of business and interview a few of the...
Study smarter with the SolutionInn App