Unit 1-03
Learning Outcome
At the end of this lesson, you will be able to:
- create an application that uses complex math and "large" variable types
Silent Watching
- watch this video
- then this video
Review
- the importance of a good design BEFORE you start coding!
Lesson
- read "Problem Solving", Chapter 2, Computer Based Problem Solving
- read up to and including "Sequence"
Activity
- read the following problem:
- Albert Einstein's famous equation E = mc2 gives the amount of energy (in Joules) released when an object of a certain mass (in kg) is converted to energy
- If the speed of light (c) is 2.998x108 m/s write a program that will allow the user to enter the mass of an object and then sees how much energy could be released from that object.
- once your first 3 steps are done, do the next 3 in Java
- post the solution and then the final program on your website
- top-down design
- flow-chart
pseudo-code- at least three (3) test cases calculated out using some other method then your program (ensure you show how you calculated each one of them out!)
- actual code
- three screen shots of the program working (with actual values from your test cases above)
- link and screenshot of Github repo
Daily Assignment
- once your first 3 steps are approved, code the next 3
- post the same six (6) items to your notebook
Extra
- answer the following question, with a program
- "A thousand tons of TNT would release about 4 TJ of energy. Hiroshima released about 63 terajoules (a 15 kiloton bomb). A typical nuke today would carry about 4,000 TJ.", add a second calculation to your above program to show how many "Kiloton bombs" equivalent the number of joules of energy being released.