Advertisement
Guest User

Untitled

a guest
Mar 31st, 2020
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. public class CollaborateSessionDriver {
  2. public static void main(String[] args) {
  3. CollaborateSession example1 = new CollaborateSession();
  4. example1.print(); // Output: No one is leading the missing students!
  5.  
  6. CollaborateSession example2 = new CollaborateSession(8, "Peter");
  7. example2.print(); // Output: Peter is leading the 8 students!
  8.  
  9. example1.setNumberOfParticipants(5);
  10. example1.print(); // Output: No one is leading the 5 students!
  11.  
  12. example2.setNameOfPresenter("Bob");
  13. System.out.println("The session is now being presented by " + example2.getNameOfPresenter()
  14. + " to " + example2.getNumberOfParticipants() + " students.");
  15.  
  16. // Output: The session is now being presented by Bob to 8 students.
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement