Examlex

Solved

We Want to Create a Class That Represents a Date

question 27

Multiple Choice

We want to create a class that represents a date. A date has a day, month, and year. For example, the date March 16, 2014 has the day 16, month 3, and year 2014. The basic framework of a date class is below: public class Date
{
Private int day;
Private int month;
Private int year;
}
We want to create a specific date using code like:
Date first = new Date (16, 3, 2014) ;
// Creates March 16, 2014
Date second = new Date (1, 9, 2013) ;
// Creates September 1, 2013
Which of the constructor specifications below will allow this code to behave as desired?


Definitions:

Fire

A rapid oxidation process that produces heat, light, and various reaction products, often resulting from combustion.

Salt Water Intrusion

The movement of saline water into freshwater aquifers, which can lead to the contamination of drinking water sources and agricultural irrigation supplies.

Acidification

The process of becoming more acidic, often referred to in the context of soil, water bodies, or the ocean's pH levels decreasing.

Desertification

The degradation of once-fertile land into nonproductive desert; caused partly by soil erosion, deforestation, and overgrazing by domestic animals.

Related Questions