Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

c++ project ,and the example of run i can not uploud it ,tell me how if you have an idee. 120... Subtask class DayOfYear: Define

c++ project ,and the example of run i can not uploud it ,tell me how if you have an idee.
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
120... Subtask class DayOfYear: Define a class with name DayOfYcar to store a date with following members: two private short unsigned integer attributes dayOrYear and year, whereas for the date the days of a year starting from January 1st (day 1) to December 31st (day 365) shall be stored. a statie constant private array days as class variable storing the number of the days in the year until January 31st , February 28th, March 31st, ... (leap years shall not be regarded). This class variable shall be defined and initialised outside of the class. Hint: especially helpful will be instead of the numbers of days in a month 31, 28, 31, 30.... a summed up number of days at the end of each month to store, i.e. 0, 31, 59, 90, an overloaded public (standard) constructor with two default parameters for the day with default value and the year with default value 365 to initialise both attributes an overloaded public constructor with three parameters for the day, month and year to initialise the day of the year. To simply calculate the day of the year use class attribute array days, e.g. for March 15th as day 74 31+28+15 - 59+15). a public method named get_dayOfYear without parameters returning the value of the respective attribute. a public overloaded member operator ++ to increment a date exactly one day Hint: after December 31st the day will be January Ist of the following year a public friend overloaded input operator>> inputting a date in ISO format yyyy-mm-dd from a character input stream. a public friend output operator

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2010 Barcelona Spain September 2010 Proceedings Part 1 Lnai 6321

Authors: Jose L. Balcazar ,Francesco Bonchi ,Aristides Gionis ,Michele Sebag

2010th Edition

364215879X, 978-3642158797

More Books

Students also viewed these Databases questions

Question

=+2. What is the background of the situation?

Answered: 1 week ago