Join Peggy Fisher for an in-depth discussion in this video Solution: Movie list, part of Learning Java.
- Let's talk about one possible solution to this challenge.…This challenge was designed to provide you…with the opportunity to start object oriented programming.…You needed to create a class,…instantiate an object of that class,…and then print the results.…Let's take a look at my solution,…but remember that your solution might be very different.…I'm gonna start with the movie class file itself.…Remember, the class file does not have a main method.…So, I have public class Movie.…I declared four pieces of instance data.…
Two are strings and two are integers.…They're all four private…because we want to ensure data integrity.…We have movie title, rating, year, and run time.…I only have one constructor.…This is the constructor that we'll use…when we wanna create a new movie object.…Inside this method, I'm updating the instance data…from movie title and setting it to…the title that was in the parameter.…The rating is getting set to the rating,…coming in from the calling program.…The year and the run time.…
I went ahead and added accessor and mutator methods,…
- Downloading and exploring NetBeans
- Understanding Java basics: data types, strings, arrays, and more
- Controlling flow with functions and loops
- Creating classes
- Sorting and searching arrays
- Manipulating files
- Handling errors
- Building GUIs
Skill Level Beginner
1. Getting Started
2. Java Basics
3. Flow of Control
4. Classes and Objects
5. Beyond the Basics
6. File Manipulation
7. Graphical User Interface Basics
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
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.