Join Patrick Royal for an in-depth discussion in this video Solution overview, part of Code Clinic: Java.
- The solution to this Code Clinic…consists of three methods: main, getCaption, and reorganize.…Before we get into the code, though,…let's start by running the class.…Take a look at the images in the package explorer.…Currently, all the images are just listed…in the code.images folder.…They're alphabetized automatically,…but otherwise unorganized.…Our goal is to take these images…and organize them into folders based on their captions.…
All of the images with captions starting with "a"…will go into a folder labeled "a," and so on.…When I run this application,…that is exactly what will happen.…Be sure to refresh your package explorer…because it won't automatically update…when the files are moved.…You can either right-click…on the explorer and choose Refresh,…or set the focus on the explorer and press F5.…As you can see, all but two of the images…are organized in subfolders.…The remaining two images don't have captions,…so they are left in the main folder.…
This code accomplishes this operation through three methods.…
Patrick introduces challenges and provide an overview of his solutions in Java. Challenges include topics such as statistical analysis, searching directories for images, and accessing peripheral devices.
Visit other courses in the series to see how to solve the exact same challenges in languages like C#, C++, PHP, Python, and Ruby.
Skill Level Intermediate
Q: I am unable to access the Lake Pend Oreille data from outside the U.S.
A: A static copy of this data is provided here for lynda.com members outside of the U.S
Problem One: Exploring Lake Pend Oreille
Problem Two: Image Analysis
Problem Three: Eight Queens
Problem Four: Accessing Peripherals
Problem Five: Recursion and Directories
Problem Six: Building the Web
- 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.