Annulé

Date Class

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 [url removed, login to view], 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: [url removed, login to view]~myers/cop3330/hw/[url removed, login to view]

Compétences : Programmation C++, Architecture Logicielle, Tests de Logiciels, Administration de Site Web

Voir plus : what month is january, what month is december, what are integers used for, positive integers examples, objective c programs, make prototypes, january is the month of, for the month of january, creating prototypes, date required value magento, complete method bodies class date, date java program helptake account actual number days month assume days february , date invalid value soapelementattribute, snoopy class date, extjs validate date picker value, http wwwrainforestnetcom date picker, sort date added http wwwgooglecomudssolutionswizardsvideobarhtml, jsp class checking date

Concernant l'employeur :
( 0 commentaires ) United States

N° du projet : #8542710

7 freelance ont fait une offre moyenne de 124 $ pour ce travail

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

100 $ USD en 1 jour
(204 Commentaires)
6.7
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 Plus

100 $ USD en 3 jours
(6 Commentaires)
2.5
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 jour
(1 Commentaire)
2.0
lancelotjs

A proposal has not yet been provided

155 $ USD en 3 jours
(0 Commentaires)
0.0
go4mugam01

I am an IT professional having 15 years of experience. I am an IT Architect working for HCL Technologies . My Previous Companies are TCS , CTS , Wipro and HP. I Passed 28 Technical Exams and Achieved 30 Technical Certi Plus

200 $ USD en 5 jours
(2 Commentaires)
0.6
justinellery

Great project, I created a calendar in CPP not too long ago so I could potentially reuse some of the code base. Either way very simple project shouldn't take too long something that could very well be done to your stan Plus

222 $ USD en 7 jours
(0 Commentaires)
0.0
JinDongZhe

I've mastered C/C++/C#/Java programming and helped many customers . I'm sure I can fulfil your job successfully. I hope our collaboration to produce a good outcome that makes u happy. Best regards.

100 $ USD en 3 jours
(0 Commentaires)
0.0
thang0207

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

111 $ USD en 5 jours
(0 Commentaires)
0.0