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...

  • write a code on .C file Problem Write a C program to implement a banking application...

    write a code on .C file Problem Write a C program to implement a banking application system. The program design must use a main and the below functions only. The program should use the below three text files that contain a set of lines. Sample data of these files are provided with the assessment. Note that you cannot use the library string.h to manipulate string variables. For the file operations and manipulations, you can use only the following functions: fopen(),...

  • Code in JAVA UML //TEST HARNESS //DO NOT CHANGE CODE FOR TEST HARNESS import java.util.Scanner; //...

    Code in JAVA UML //TEST HARNESS //DO NOT CHANGE CODE FOR TEST HARNESS import java.util.Scanner; // Scanner class to support user input public class TestPetHierarchy { /* * All the 'work' of the process takes place in the main method. This is actually poor design/structure, * but we will use this (very simple) form to begin the semester... */ public static void main( String[] args ) { /* * Variables required for processing */ Scanner input = new Scanner( System.in...

  • By editing the code below to include composition, enums, toString; must do the following: Prompt the...

    By editing the code below to include composition, enums, toString; must do the following: Prompt the user to enter their birth date and hire date (see Fig. 8.7, 8.8 and 8.9 examples) in addition to the previous user input Create a new class that validates the dates that are input (can copy date class from the book) Incorporate composition into your class with these dates Use enums to identify the employee status as fulltime (40 or more hours worked for...

  • 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....

  • Program 7 File Processing and Arrays (100 points) Overview: For this assignment, write a program that...

    Program 7 File Processing and Arrays (100 points) Overview: For this assignment, write a program that will process monthly sales data for a small company. The data will be used to calculate total sales for each month in a year. The monthly sales totals will be needed for later processing, so it will be stored in an array. Basic Logic for main() Note: all of the functions mentioned in this logic are described below. Declare an array of 12 float/doubles...

  • 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...

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
ADVERTISEMENT