Reference no: EM131299905
Assignment
Month Class
Design a class named Month . The class should have the following private members:
• name A string object that holds the name of a month, such as "January," "February," etc.
• monthNumber An integer variable that holds the number of the month. For example, January would be 1, February would be 2, etc. Valid values for this variable are 1 through 12.
In addition, provide the following member functions:
• A default constructor that sets monthNumber to 1 and name to "January."
• A constructor that accepts the name of the month as an argument. It should set name to the value passed as the argument and set monthNumber to the correct value.
• A constructor that accepts the number of the month as an argument. It should set monthNumber to the value passed as the argument and set name to the correct month name.
• Appropriate set and get functions for the name and monthNumber member variables.
• Prefix and postfix overloaded ++ operator functions that increment monthNumber and set name to the name of next month. If monthNumber is set to 12 when these functions execute, they should set monthNumber to 1 and name to "January."
• Prefix and postfix overloaded -- operator functions that decrement monthNumberm and set name to the name of previous month. If monthNumber is set to 1 when these functions execute, they should set monthNumber to 12 and name to "December."
Also, you should overload cout 's << operator and cin 's >> operator to work with the Month class. Demonstrate the class in a program.
Problem regarding the data controls
: You learned in your readings that there are a variety of data controls and data source controls. That can be confusing to beginners. Data source controls manage the connection and command and data controls help manage presenting the content.
|
Fin102 assignment-global financial crisis
: The Global Financial Crisis is the most significant worldwide economic catastrophe since the Great Depression of 1929; sub-prime mortgage crisis is an example of financial crisis that affected global financial market worldwide. What are other example..
|
What is the purpose of your mission trip
: MAT-144 Mission Project. What is the purpose of your mission trip? In general, mission trips fall into three categories - providing aid in the form of supplies, providing education, and providing services such as medical clinics and building house..
|
What rate of return should jacobs require on a project
: What rate of return should Jacobs require on a project of average risk?- If a new venture is expected to have a beta of 1.6, what rate of return should Jacobs demand on this project?
|
Write a program that design a class named month
: Design a class named Month . The class should have the following private members: name A string object that holds the name of a month, such as "January," "February," etc.
|
Main types of linux commands
: Which of the following is not one of the three main types of Linux commands?
|
Create a text file with one record of text data
: Create a text file with one record of text data. This text file will be read by the program and the data in the text file will serve as a search term.
|
Write a system to read from a file list of employee payroll
: Write a system to read from a file a list of employee payroll information, calculate net salary amounts based on base salary, bonus, and % deduction.
|
What is the current market price of these bonds
: Western Enterprises' bonds have 10 years remaining to maturity. Interest is paid annually, the bonds have a $1,000 par value, and the coupon rate is 9 percent. The bonds have a yield to maturity of 7 percent. What is the current market price of th..
|