Join Peggy Fisher for an in-depth discussion in this video Solution: Debugging, part of Java Essential Training for Students.
- Welcome back.…How did you make out with your challenge?…I hope you were able to find the errors.…I'd like to show you how I would approach this problem.…As I stated earlier, the first thing is to figure out…what the expected results should be.…The first part of the code allows the user to enter…a set of numbers and find the average.…The second part says, "Okay, I'm gonna give you…"the numbers, three, five, and eight,…"add them together, divide them by three…"and print out the average."…And the last part is converting…from Fahrenheit to Celsius.…
It's starting with a Fahrenheit value of 212.…So my expected values, for the first part…I'm gonna enter three numbers; 10.5, 15, and 7.5.…So I expect the total to be 33…and the average to be 11.…On LIne 28, it should print out the average…of three plus five plus eight divided by three…which should be 5.33 repeating.…And finally, using the formula for Celsius…equals 5/9 times Fahrenheit minus 32.…
I know if Fahrenheit is 212 the Celsius should be 100.…Let's run the program and see what we get.…
- Getting started with parsing
- Reviewing data types
- Using decisions
- Creating user-defined methods
- Command-line debugging
- Exploring the Java API
- Creating and instantiating classes
- Working with interfaces
- Storing items with arrays
Skill Level Intermediate
Q: How can I make my debugger function like the author’s?
Learning Java Applications (2012)with Todd Perkins1h 42m Beginner
1. Command Level Programming
2. Basics Review
4. Java API
5. Simulations and Algorithm Analysis
6. Classes and Objects
7. More on Classes
8. Data Structures
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.