Question: JAVA The objective of the code is to produce this output: ////////////output////////////////////////////// Program to assign leads to users 0. Quit 1. Add a lead 2.
JAVA The objective of the code is to produce this output: ////////////output////////////////////////////// Program to assign leads to users 0. Quit 1. Add a lead 2. Add a user 3. Assign leads 4. Display leads Please choose a cmd (0-4): 1 Please enter a name for the lead: Jane Doe Please enter an email contact for the lead: jdemail.com Please enter the country where the lead is located: USA 0. Quit 1. Add a lead 2. Add a user 3. Assign leads 4. Display leads Please choose a cmd (0-4): 1 Please enter a name for the lead: Mark Spence Please enter an email contact for the lead: mmsfakemail.com Please enter the country where the lead is located: UK 0. Quit 1. Add a lead 2. Add a user 3. Assign leads 4. Display leads Please choose a cmd (0-4): 4 Name Country Email Assigned User ----------------------------------------------------------------- Jane Doe USA jdemail.com Mark Spence UK msfakemail.com 0. Quit 1. Add a lead 2. Add a user 3. Assign leads 4. Display leads Please choose a cmd (0-4): 2 Please enter a name for the user: Dora Singh Is the user online? (true/false) true 0. Quit 1. Add a lead 2. Add a user 3. Assign leads 4. Display leads Please choose a cmd (0-4): 2 Please enter a name for the user: Fred Ho Is the user online? (true/false) true 0. Quit 1. Add a lead 2. Add a user 3. Assign leads 4. Display leads Please choose a cmd (0-4): 3 0. Quit 1. Add a lead 2. Add a user 3. Assign leads 4. Display leads Please choose a cmd (0-4): 4 Name Country Email Assigned User ----------------------------------------------------------------- Jane Doe USA jdemail.com Dora Singh Mark Spence UK msfakemail.com Fred Ho 0. Quit 1. Add a lead 2. Add a user 3. Assign leads 4. Display leads Please choose a cmd (0-4): 0
////////////////////end of output///////////////////////////////////////////////////////////////
details on how to set up the classes:
1. All classes should be in the crm package, which, means all files need to be in the crm folder (usually under the src folder)
2. Lead class:
a. Stores the name, email contact, country and the current assigned user for this lead (see next item)
3. User class
a. Stores user name, whether user is online or not, and a list of Leads assigned to this user
4. AssignLeads class:
a. Stores a List of Leads and a List of Users, but just in memory.
b. Supports operations to:
i. Add a lead Javas Scanner class has useful features for reading in different types of values, including whole lines of text to cover input with spaces
1. The functions that just read the next word (whether as a String or some other type like int) stop at the first character that is not part of the word, so there is often a newline still in the input stream after reading one of these. Use Scanners nextLine() to skip past the end of the current line.
ii. Add a user
iii. Assign users to leads who do not have an assigned user
iv. Display info on the leads
v. Quit the program
5. Comment each class and each function to explain what the function does, as well as the overall program. Short comments are welcome, but do not simply repeat what the syntax already tells us (this is a comment for the Lead class would be a useless comment, to be blunt)
6. Choose good variable and function names
7. Name any constants you use, and use those names (like for the command numbers)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
