Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class CollaborateSessionDriver {
- public static void main(String[] args) {
- CollaborateSession example1 = new CollaborateSession();
- example1.print(); // Output: No one is leading the missing students!
- CollaborateSession example2 = new CollaborateSession(8, "Peter");
- example2.print(); // Output: Peter is leading the 8 students!
- example1.setNumberOfParticipants(5);
- example1.print(); // Output: No one is leading the 5 students!
- example2.setNameOfPresenter("Bob");
- System.out.println("The session is now being presented by " + example2.getNameOfPresenter()
- + " to " + example2.getNumberOfParticipants() + " students.");
- // Output: The session is now being presented by Bob to 8 students.
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement