- I hope you liked that last challenge.…What I'd like to do is take a look…at my solution, but again, remember that…your solution might be very different.…I'm going to try and point out…some of the key aspects that I chose…for this program.…Let's start with the pizza class.…Remember, this is a super class…because there's two types of pizza,…regular and Sicilian, that will…extend the pizza class.…So at the top, I have…public abstract class Pizza implements Comparable.…We knew we wanted to be able to compare two pizzas…based on their size.…
Next, I have some constant variables…that show how big a pizza is.…The small diameter is 12 inch,…medium is 14, large is 16, and extra large is 18.…I have a price array that includes…the cost for each of those pizzas, respectively.…Let's scroll down a little bit,…and you'll see I have some constructors…for the pizza class.…What I want to show you,…is on line 40, I have…public abstract void getToppings.…Can you think of a reason why…I would want to make that…an abstract method?…If you remember, one of the differences…
- 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.