Question
can help me unders better these work package week_7.q1_travel_wish_list; import java.util.ArrayList; import java.util.Collections; import java.util.List; import static input.InputUtils. stringInput ; import static input.InputUtils. yesNoInput ;
can help me unders
better these work
package week_7.q1_travel_wish_list;
import java.util.ArrayList; import java.util.Collections; import java.util.List; import static input.InputUtils.stringInput; import static input.InputUtils.yesNoInput; /** Program to create and display a list of places a user wishes to travel to. */ public class WishList { public static void main(String[] args) { // TODO modify this line so the wishList List stores Place objects List <>wishList = new ArrayList<>(); do { String name = stringInput("Enter the name of the place"); String reason = stringInput("Why do you want to visit " + name + "?"); // TODO use the newPlace method to // create a new Place object with the name, and reason // The Place object's constructor should calculate the date created and store that. // TODO add the new Place object, returned by newPlace, to the wishList } while (yesNoInput("More places to add to your wish list?")); // TODO Call the displayPlacesInNameOrder method to print // a list of the places, sorted by name //Display th wishList } public static Place newPlace(String placeName, String reason) { // TODO create a new Place object with the given placeName and reason } public static void displayPlacesInNameOrder(List
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started