Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void rating (){
- Scanner kb = new Scanner(System.in);
- do{
- System.out.println("What do you feel about the book? (Rating:1 to 5) 1 is Terrible, and 5 is Great\n");
- rate= kb.nextInt();
- ans = addRating(rate);
- System.out.println("exited addRating");
- if (ans==true){
- System.out.println("Do you want to rate again? y or n");
- choice = kb.nextLine();
- switch (choice){
- case "y":case "yes":
- break;
- case "n":case "no":
- tabulate();
- break;
- default:
- System.out.println("Sorry, please choose between the two");
- }
- count++;
- }
- }while (ans == true && ans==false && count<6 &&!choice.equalsIgnoreCase("yes") &&!choice.equalsIgnoreCase("no")&&!choice.equalsIgnoreCase("y") &&!choice.equalsIgnoreCase("n"));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement