Hi Guys who are online,
Please help me to solve this problem.
------------------------------------------------
System.out.prin tln("Food Truck's list of review : " + found.getListRe viewReceived(). toString());
getListReviewRe ceived is appearing empty
I have uploaded the whole program. So you guys will be
able to understand my problem.
https://www.dropbox.com/s/01hzol5d728xwmz/BIT203%20Assign ment%201.pdf?dl =0
https://www.dropbox.com/s/kh6ecpyp9ghy53y/BIT203%20Assign ment%202.pdf?dl =0
https://www.dropbox.com/s/25xo3emf2gidpdf/FTTConsole.zip? dl=0
Please help me to solve this problem.
Code:
ublic static void ViewFoodTruckInfo() {
// 1 user wants to view information about food trucks
// 2 User login with username and password
System.out.println("Enter username : ");
String username = sc.next();
System.out.print("Enter password : ");
String password = sc.next();
// Username and password is searched
User foundCust = objCustomer.searchUserByName(username);
User foundPass = objCustomer.searchUserPassword(password);
// If username and password is correct
if (foundCust != null && foundPass != null) { // If the user is a Customer fullname and email is shown
System.out.println("Name : " + foundCust.getFullName());
System.out.println(" Email :" + foundCust.getEmail());
// Customer selects to view food trucks based on location or foodtype
System.out.println("Do you wants to (V)iew foodTrucks Or (R)eview foodTrucks : ? ");
String input = sc.next();
if (input.equalsIgnoreCase("V")) {
// Customer enter foodtype of location
System.out.println("Enter truck Food Type or Location : ");
String stringans = sc.next(); // type or location is searched
FoodTruck found = objFoodTruck.FoodTruckByTypeOrLoc(stringans);
// If location or foodtype matches a FoodTruck
if (found != null) {
System.out.println("FoodTruck Name : " + found.getTruckName()); // found food Truck Average rating and list of review is shown
System.out.println("Food Truck Average Rating : " + foundCust.getAverageRatings());
System.out.println("Food Truck's list of review : " + found.getListReviewReceived().toString());
} else {
System.out.println("There is no Truck by that foodtype or Location..");
}
} else if (input.equalsIgnoreCase("R")) {
// method to review
ReviewFoodTruck();
} else {
System.out.println("You can (V)iew or (R)eview FoodTruck Only!!");
}
}
}
------------------------------------------------
System.out.prin tln("Food Truck's list of review : " + found.getListRe viewReceived(). toString());
getListReviewRe ceived is appearing empty
I have uploaded the whole program. So you guys will be
able to understand my problem.
https://www.dropbox.com/s/01hzol5d728xwmz/BIT203%20Assign ment%201.pdf?dl =0
https://www.dropbox.com/s/kh6ecpyp9ghy53y/BIT203%20Assign ment%202.pdf?dl =0
https://www.dropbox.com/s/25xo3emf2gidpdf/FTTConsole.zip? dl=0
Comment