using this code create random behaviors for the students, they could be reading, surfing the web, or

using this code create random behaviors for the students, they could be reading, surfing the web, or talking with other students, etc. Were suppose to create this based off the code we had to create last week which is what is below.

import java.util.Scanner;
public class student {
  

private static class Person {
   public static void main(String[] args){
       Scanner in = new Scanner(System.in);
       String person1, person2, person3;
       int age1, age2, age3;
       System.out.println(“Enter Person 1 details”);
       System.out.print(“Name: “);
       person1 = in.nextLine();
       System.out.print(“Age: “);
       age1 = in.nextInt();
       System.out.println(“Enter Person 2 details”);
       System.out.print(“Name: “);
       in.nextLine();
       person2 = in.nextLine();
       System.out.print(“Age: “);
       age2 = in.nextInt();
       System.out.println(“Enter Person 3 details”);
       System.out.print(“Name: “);
       in.nextLine();
       person3 = in.nextLine();
       System.out.print(“Age: “);
       age3 = in.nextInt();
       if(age1
           if(age1
               System.out.println(person1 + ” is the youngest”);
           }
           else{
               System.out.println(person3 + ” is the youngest”);
           }
           if(age2 > age3){
               System.out.println(person2 + ” is the oldest”);
           }
           else{
               System.out.println(person3 + ” is the oldest”);
           }
       }
       else{
           if(age2
               System.out.println(person2 + ” is the youngest”);
           }
           else{
               System.out.println(person3 + ” is the youngest”);
           }
           if(age1 > age3){
               System.out.println(person1 + ” is the oldest”);
           }
           else{
               System.out.println(person3 + ” is the oldest”);
           }
       }
   }
}
   
}

Save your time - order a paper!

Get your paper written from scratch within the tight deadline. Our service is a reliable solution to all your troubles. Place an order on any task and we will take care of it. You won’t have to worry about the quality and deadlines

Order Paper Now

create a method in the class student that returns what the student is doing

this method have to generate the behavior randomly. It can’t return the same thing every time.

implement a for loop in the application to call for the student behavior for 20 times.

In a 20 minute period you are going to check every minute = 20 times.

(No need to work with TIME functions in Java. We are making a simulation as if every count of the for loop is one minute)

Generate a report in the end summarizing what the student has done in class.

 

Looking for a Similar Assignment? Let us take care of your classwork while you enjoy your free time! All papers are written from scratch and are 100% Original. Try us today! Use Code FREE15