Calculate the new date by adding a fixed number

Assignment Help Basic Computer Science
Reference no: EM131457652

The class dateType was designed and implemented to keep track of a date, but it has very limited operations. Redefine the class dateType so that it can perform the following operations on a date, in addition to the operations already defined:

a. Set the month.

b. Set the day.

c. Set the year.

d. Return the month.

e. Return the day.

f. Return the year.

g. Test whether the year is a leap year.

h. Return the number of days in the month. For example, if the date is 3-12-2013, the number of days to be returned is 31 because there are 31 days in March.

i. Return the number of days passed in the year. For example, if the date is 3-18-2013, the number of days passed in the year is 77. Note that the number of days returned also includes the current day.

j. Return the number of days remaining in the year. For example, if the date is 3-18-2013, the number of days remaining in the year is 288.

k. Calculate the new date by adding a fixed number of days to the date. For example, if the date is 3-18-2013 and the days to be added are 25, the new date is 4-12-2013.

Reference no: EM131457652

Questions Cloud

Stack adt in a fully generic manner : Implement the stack ADT in a fully generic manner (through the use of templates) by means of a singly linked list.
How does he support his main argument : The purpose of this essay assignment is for you to demonstrate your ability to discuss, analyze, and evaluate complex philosophic arguments.
Find the vector normal to the plane : Find the vector normal to the plane through the points P(1,-1,0),Q(2,1,-1) and R(-1,1,2)- Find the area of the triangle formed by the above three point
Define common methods of measuring effectiveness of websites : Outline the steps involved in developing successful e-business Web sites, and identify methods for assessing Web site effectiveness.
Calculate the new date by adding a fixed number : Calculate the new date by adding a fixed number of days to the date. For example, if the date is 3-18-2013 and the days to be added are 25, the new date.
Domains for a typical it infrastructure : Describe the 7 domains for a typical IT infrastructure where network security is implemented.
How effective is current public health approach to obesity : How effective is the current public health approach to obesity? How evolutionary principles improve the context of human health and diseases?
Distinguish between current and long-term assets : Is there a difference in approach to valuation by US GAAP and IFRS? Discuss and note two or three specific differences.
Parameters for ip address range : What are the configuration entries used in the /etc/dhcp/dhcpd.conf file to specify the TCP/IP parameters for IP address range

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd