- This challenge was meant to refresh your skills in working…with various data types and working with methods.…Let's take a look at my solution,…and remember, your solution might be very different.…At the top of my solution, I have my main method.…Inside the main method, I only call two methods,…just like before.…I have in line 32, String name = getName();…and then 33, I have printTotal() and I pass…the name of the student to the printTotal() method.…Let's scroll down a little bit.…
In the printTotal() method, I have a parameter…that brings in the name as a string.…Then, I check to see if the student is on campus…by calling the onCampus() method,…which returns a Boolean variable of true…if they're on campus or false if they're not.…On line 46, you can see I'm actually calling…several methods within the statement that says…total = calculcateTotal() expenses and I give it…the estimatedLivingExpenses(), the booksAndSupplies(),…the creditHours(), and the costPerCredit() hour.…
If the student is not on campus, then I don't need…
- 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?
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.