Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Main {
- public static void main(String[] args) {
- System.out.println("Beginning forum example");
- if (args.length < 2) {
- System.out.println("Usage: java Main <first name> <last name>");
- System.err.println("<first name> and <last name> are required");
- System.exit(1);
- }
- // Uncomment this when prompted
- Forum forum = new Forum("Java");
- // TODO: pass in the first name and last name that are in the args parameter
- User author = new User(args[0],args[1]); // Get name from arguments
- // TODO: initialize the forum post with the user created above and a title and description of your choice
- ForumPost post = new ForumPost(author, "A title", "A description"); // Use the User created above as the first argument
- forum.addPost(post); // Use the ForumPost created above to add a post to the forum
- //
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement