Question: CODE THE FOLLOWING USING C# ONLY. THANK YOU Executable code will fall within a loop that continues to loop until menu item 3 is entered.
CODE THE FOLLOWING USING C# ONLY. THANK YOU
Executable code will fall within a loop that continues to loop until menu item 3 is entered. The menu (see screenshots below) appears first, and what follows depends on which menu item chosen.
A base Contact class needs to be created with the following properties:
First name require an entry for it
Last name require an entry for it
Address entry not required
But if user just presses Enter without providing entry, Address = N/A
State entry not required
But if user just presses Enter without providing entry, State = N/A
Zip Code entry not required
But if user just presses Enter without providing entry, Zip = 0
Country
If State has a value, then Country is set to USA dont prompt for a Country
If State does not have a value: - entry for Country not required
But if user just presses Enter without providing a Country, Country = N/A
Phone number (land-line) entry not required
But if user just presses Enter without providing entry, Phone-land = N/A
Phone number (cell) entry not required
But if user just presses Enter without providing entry, Phone-cell = N/A
Extend the base Contact class to a child class that holds only family/friend contacts. This child class will contain 3 of its own properties:
Relationship to you the user can choose one of the options the program will provide (see screenshots below).
Birthday (data type DateTime). The program will ask the user for the month, day, and year, and those three items will create the date.
The date 10 days before birthday (so you know when to start shopping for a present)
The user wont provide this date the program will calculate it from the Birthday.
Also extend the base Contact class to a child class that holds only Business contacts. This child class will contain 3 of its own properties:
Company if the user just presses Enter, Company = ACME Yarn and Supplies
Position entry not required
But if user just presses Enter without providing entry, Position = N/A
Email address
If Company = ACME Yarn and Supplies, then Email address is set to sales@ACMEYarn.com dont prompt for the email address
If Company = anything else, prompt for the email address.
Continued on next page . . . . . . .
The program needs to do the following:




The program needs to do the following: 1. Display this menu. Don't move on until the user types in a 1, 2 or 3. Nothing else accepted 1. create a Friend/Family entry 2. Create a Business Contact entry 3. Quit choose item 1, 2, or 3: 1 2. If the user enters 1, prompt for the values to the base properties. a. Make sure that first and last name receive entries b. Address and State either get entries, or N/A c. zip code either gets an entry, or = 0 d. Country forced to be USA if State has an entry (don't prompt for it). Otherwise, prompt for it, and it either gets an entry, or = N/A The 2 phone numbers either get entries, or = N/A e. irst name Creg'd): John ast name (req"d): Smith ddress (or Enter if N/A) 123 Oak St tate (or Enter if N/A): Zip Code (or Enter if no zip code) 54321 Country Cor Enter if N/A): USA Phone number land line (or Enter if N/A): f N/A): 612-456-2345 Phone number - cell phone Cor Enter i The program needs to do the following: 1. Display this menu. Don't move on until the user types in a 1, 2 or 3. Nothing else accepted 1. create a Friend/Family entry 2. Create a Business Contact entry 3. Quit choose item 1, 2, or 3: 1 2. If the user enters 1, prompt for the values to the base properties. a. Make sure that first and last name receive entries b. Address and State either get entries, or N/A c. zip code either gets an entry, or = 0 d. Country forced to be USA if State has an entry (don't prompt for it). Otherwise, prompt for it, and it either gets an entry, or = N/A The 2 phone numbers either get entries, or = N/A e. irst name Creg'd): John ast name (req"d): Smith ddress (or Enter if N/A) 123 Oak St tate (or Enter if N/A): Zip Code (or Enter if no zip code) 54321 Country Cor Enter if N/A): USA Phone number land line (or Enter if N/A): f N/A): 612-456-2345 Phone number - cell phone Cor Enter
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
