Question
Create a program that leads (potential customers) might be assigned to users (probably sales reps) in a Customer Relationship Management tool in Java language. Your
Create a program that leads (potential customers) might be assigned to users (probably sales reps) in a Customer Relationship Management tool in Java language.
Your code should generate output like the following:
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: jd@mail.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: ms@hotmail.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 jd@mail.com Mark Spence UK ms@hotmail.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
Hints:
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started