Question

Write a (Windows) two-class application that creates a customer code to be placed on a mailing...

Write a (Windows) two-class application that creates a customer code to be placed on a mailing label for a magazine. Allow the user to input their full name with the first name entered first. Prompt them to separate their first and last name with space. Ask for their birthdate in the format of mm/dd/ yyyy. Ask for the month (number) they purchased a subscription and ask for their zip code. Your mailing label should contain the last name, followed by their year of birth, the number of characters in the full name, the first three characters of the month they purchased the subscription, and the last two digits of their zip. The code for Bob Clocksom born 01/22/1993, who purchased his subscription during the 10th month of the year and lists 32226 as his zip code would be Clocksom9312Oct26. Provide the algorithm for the problem. Remember to include comments in the program body to explain the codes.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Program Plan and description:--

• This program has two classes that makes a client code which is utilized to be put on a mailing name for a magazine. • This program has two classes in particular namestring and Program.

• namestring is a class which has the strategies used to ascertain the last name of a client, the last two digits of the birth year, the month name at which the client made a buy, and the last two digits of a postal district.

• str_split() is a strategy which is utilized to locate the last name of a client.

• month_year() is a strategy which is utilized to locate the last two digit of a birth year.

• Month() is a technique which is utilized to discover the name of the month in which the client made a buy.

• zipl () is a technique which is utilized to locate the last two digit of a postal division.

• The client is incited to enter the name of the client, the birth date, the month at which the client made a buy, and the postal district.

• Program class is utilized to take contribution from the client and makes the object of the namestring class and calls the techniques utilizing the article.

• If the client entered any invalid worth, a mistake message showed on the screen.

CODE:--

Program: /************************ *************************** *Program that has two classes for taking input from the * *usereturn n; //Return the name of the month. public string month(int m) string mname=; switch (m) case 1: mname = Jan; breakmname = Oct; break; case 11: mname = Nov; break; case 12: mname = Dec; break; default : mname = Enter a valid value...count = fullname.Length; Console.WriteLine(Enter the date of +birth....); //Get the birth date. string birth_date = ConsoOUTPUT OF CODE :--

Sample Output: Enter the fullname.... name followed by space then name... Bob Clocksom Enter the date of birth... 01/22/1993

Add a comment
Know the answer?
Add Answer to:
Write a (Windows) two-class application that creates a customer code to be placed on a mailing...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • A fitness tracking app company has asked you to develop a windows application using a GUI...

    A fitness tracking app company has asked you to develop a windows application using a GUI to determine the total amount of hours somebody has exercised during their lifetime, assuming on average a user has exercises 2.5 hours per week. When the user uses the app, they will enter the following: First Name: Last Name: Date of Birth (in mm/dd/yyyy): Current Date (in mm/dd/yyyy) This program should display the users name and the number of hours the user has exercised...

  • Create a Java application named Problem14 using the two files Dr. Hanna provided to you—Date.java andProblem14.java—then change his code to add two non-trivial public, non-static methods to the Date class.

    Create a Java application named Problem14 using the two files Dr. Hanna provided to you—Date.java andProblem14.java—then change his code to add two non-trivial public, non-static methods to the Date class.1. Increment a Date to the next day (for example, 1-31-2011 increments to 2-1-2011; 12-31-2010 increments to 1-1-2011).2. Decrement a Date to the previous day (for example, 2-1-1953 decrements to 1-31-1953; 1-1-1954 decrements to 12-31-1953).. Extra Credit (up to 5 points) Re-write the Date member functions Input() and Output() to usedialog boxes to...

  • Tasks A. (20 po ints) In Lab 6, you defined and implemented a class called Date....

    Tasks A. (20 po ints) In Lab 6, you defined and implemented a class called Date. You will make some modific ation to the Date class so that it mccts the folowing specific ations: The Date class consists of three private member variables: Member Variable year month day Description An int variable that hokls the value of a year. An int variable that hokds the value of a month An int variable that hokis the value of a day. The...

  • Instructions Comprehensive Problem 2-1 Beverly and Ken Hair have been married for 3 years. Beverly works...

    Instructions Comprehensive Problem 2-1 Beverly and Ken Hair have been married for 3 years. Beverly works as an accountant at Cypress Corporation. Ken is a full-time student at Southwest Missouri State University (SMSU) and also works part-time during the summer at Cypress Corp. Ken's birthdate is January 12, 1993 and Beverly's birthdate is November 4, 1995. Beverly and Ken each received a W-2 form from Cypress Corporation (see separate tab). The Hairs have interest income of $1,000 on City of...

  • 23. What is the total net amount of capital gain reported on Form 1040? OA. $308...

    23. What is the total net amount of capital gain reported on Form 1040? OA. $308 OB. $2,411 C. $2,719 OD. $2,900 Advanced Scenario 7: Mark and Barbara Matthews Directions Using the tax software, complete the tax return, including Form 1040 and all appropri- ate forms, schedules, or worksheets. Answer the questions following the scenario. Note: When entering Social Security numbers (SSNs) or Employer Identification Numbers (EINS), replace the Xs as directed, or with any four digits of your choice....

  • SCREENSHOTS OF CODE ONLY!! PLEASE DON'T POST TEXT!! C++ CODE! PLEASE DON'T REPOST OLD POSTS! Objective...

    SCREENSHOTS OF CODE ONLY!! PLEASE DON'T POST TEXT!! C++ CODE! PLEASE DON'T REPOST OLD POSTS! Objective To gain experience with the operations involving binary search trees. This data structure as linked list uses dynamic memory allocation to grow as the size of the data set grows. Unlike linked lists, a binary search tree is very fast to insert, delete and search. Project Description When an author produce an index for his or her book, the first step in this process...

  • Super stuck on a couple of questions on this scenario. Advanced Scenario 7: Mark and Barbara...

    Super stuck on a couple of questions on this scenario. Advanced Scenario 7: Mark and Barbara Matthews Directions Using the tax software, complete the tax retum, including Form 1040 and all appropri- ate forms, schedules, or worksheets. Answer the questions following the scenario. Note: When entering Social Security numbers (SSNS) or Employer identification Numbers (EINS), replace the Xs as directed, or with any four digits of your choice. Interview Notes • Mark and Barbara are married and want to file...

  • AO OUR CITY Department of the Treasury Service OMB Number Form 13614-C 2010 Intake/Interview & Quality...

    AO OUR CITY Department of the Treasury Service OMB Number Form 13614-C 2010 Intake/Interview & Quality Review Sheet You will need . Please complete pages 14 of this form, - Tax Information such as Forms W-2 100 100 1095 - You are responsible for the information on your return. Please provide - Social security cards or ITIN letters for persons on your tax retum complete and accurate information Picture D uchas valid driver's license for you and your spouse. ....

  • 1-Summarize the article briefly in your own words. 2-Explain the main theme of this case and...

    1-Summarize the article briefly in your own words. 2-Explain the main theme of this case and its implications for the future of forensic science. 3-Several genealogy sites (including ancestry.com, 23andme.com, familytreedna.com, findmypast.com) were used in this case -- do you believe that law enforcement should have access to these databases as a standard practice? Why or why n Article How a Jane Doe child case uncovered a serial killer, identified victims and changed the use of DNA forensics Investigators and...

  • Beverly and Ken Hair have been married for 3 years. Beverly works as an accountant at...

    Beverly and Ken Hair have been married for 3 years. Beverly works as an accountant at Cypress Corporation. Ken is a full-time student at Southwest Missouri State University (SMSU) and also works part-time during the summer at Cypress Corp. Ken's birthdate is January 12, 1993 and Beverly's birthdate is November 4, 1995. Beverly and Ken each received a W-2 form from Cypress Corporation (see separate tab). The Hairs have interest income of $1,000 on City of St. Louis bonds. Beverly...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT