Date Class

Cancelado Publicado Sep 24, 2015 Pagado a la entrega
Cancelado Pagado a la entrega

Objective: This assignment will provide further practice with implementing classes.

Task: For this homework, you will write a class called Date, in the files date.h and [login to view URL], for creating and using objects that will store valid dates of the year.

This class should be portable, so it should work with any up-to-date C++ compiler. Make sure that it works with g++ before you hand it in. You should write some test programs of your own to test the functionality of the class.

Program Details and Requirements:

1) An object of type Date should represent a calendar date in terms of month, day, and year, as on a 12-month A.D. calendar. The valid months are January through December, a valid day must correspond to a valid day for the given month, and the year must be a positive number. Your object should also store a format setting, to be used for display of dates to the screen. There will be more than one possible format. The class features (public interface) should work exactly as specified, regardless of what program might be using Date objects.

Note: For purposes of easy input (from keyboard or into functions), date values will be specified with integers. Month values will be 1 for January, 2 for February, etc... on to 12 for December. A valid day value will be an integer between 1 and the number of days in the month. Valid year values are positive numbers.

2) Your Date class must provide the following services (i.e. member functions) in its public section. These functions will make up the interface of the Date class. Make sure you use function prototypes as specified here. (You may write any other private functions you feel necessary, but the public interface must include all the functionality described here).

the constructor(s):

The Date class should have a constructor that allows the user to specify the values for the month, day, and year, using integer values, when the object is declared. If any of the values would result in an invalid date, the constructor should throw out the erroneous information and initialize the object to represent 1/1/2000 (January 1, 2000) instead. Also, you should allow a Date object to be declared without specified values, in which case it should initialize to 1/1/2000 also.

Examples: These declarations should be legal, and the comment gives the initialized date

Date d1; // initializes to Jan 1, 2000

Date d2(3,4,1992); // initializes to March 4, 1992

Date d3(13,30,1990); // invalid month, initializes to Jan 1, 2000 instead.

The rest is accessible from here: [login to view URL]~myers/cop3330/hw/[login to view URL]

Programación en C++ Arquitectura de software Verificación de software Gestión de páginas web

Nº del proyecto: #8542710

Sobre el proyecto

6 propuestas Proyecto remoto Activo Sep 24, 2015

6 freelancers están ofertando un promedio de $129 por este trabajo

dobreiiita

Hello I am C++ expert and interested in this project. I have reviewed the requirements carefully and confident to handle this project perfectly. I also have a lot of experience in helping students with assignments. Más

$100 USD en 1 día
(275 comentarios)
7.0
needoCh

Hi, I am Software Engineer. I have skills in Desktop Application Development, Android Development, Databases, Web development and Graphics Designing. I have experience with C/C++, C#, Java, Visual Basic, SQL/MySQL, HT Más

$100 USD en 3 días
(22 comentarios)
4.3
cruizv

Expert in use of C++ language. This cost is to develop all general requirements + leap years. If you need extra B (Julian day), I could do this for $10 more. Is delivered with a tester in 1 day.

$83 USD en 1 día
(1 comentario)
2.0
lancelotjs

A proposal has not yet been provided

$155 USD en 3 días
(0 comentarios)
0.0
thang0207

Đề xuất vẫn chưa được gửi

$111 USD en 5 días
(0 comentarios)
0.0