EBK C   PROGRAMMING:
EBK C PROGRAMMING:
8th Edition
ISBN: 9780357156025
Author: Malik
Publisher: Cengage Learning
Question
Book Icon
Chapter 10, Problem 7PE
Program Plan Intro

Program Plan:

  • Declare a class dayType to store a day and to check the day number is valid or not. If it is valid, then go to the next function. Otherwise print the message "Day number should be in between 0 and 6."
  • Implement the main function that tests all constructors and functions in the class dayType.
  • Implement set function that accepts a day as a parameter then verifies whether the day is valid and sets that day as the current day.
  • Implement print function that accepts a day as an integer parameter and displays that day as a string.
  • Implement getDay function that returns the current day as an integer.
  • Implement next_day function that returns the next day to the current day as an integer.
  • Implement prev_day function that returns the previous day to the current day as an integer.
  • Implement a default constructor that sets 0 to the current day as Sun (Sunday).
  • Implement parameterized constructor that sets the specified day to the current day.

Program Description: The purpose of the program is to implement the days of the week. It stores the day such as Sunday and it performs the specified operations.

Blurred answer
Students have asked these similar questions
I need to resolve the following....You are trying to convince your boss that your company needs to invest in a license for MS-Project (project management software from Microsoft) before beginning a systems project. What arguments would you give her?
What are the four types of feasibility? what is the issues addressed by each feasibility component.
I would like to get ab example of a situation where Agile Methods might be preferable versus the traditional SDLC? What are the characteristics of this situation that give Agile Methods an advantage?
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
Text book image
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Text book image
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781305480537
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Text book image
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
Text book image
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning
Text book image
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage