Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This is in reference to JAVA public class Date private int myDay, private int myMonth; private int myYear: public Date() //default constructor 1 public Date(

image text in transcribed

This is in reference to JAVA

public class Date private int myDay, private int myMonth; private int myYear: public Date() //default constructor 1 public Date( int mo, int day, int yr ) //constructor 1 public int month() //returns month of date 1 public int day ( ) //returna day of date i implementation code> public int year() // returns year of date 1 1/string representation of Date as "m/d/y", e.g. 4/18/1985 public string tostring() 4 A client class has a display method that writes the date represented as its parameter: // Outputs date d in the form month:day:year. Public void display (Date d) { /* method body */ } Which of the following are the correct replacements for /* method body * /? 1. Date d = new Date(m, d, y); System.out.println(d); II. System.out.println(d.month() + ":" + d.day() + ":" + d.year()); III. System.out.println(d); Options: 1. 1 Only 2. II Only 3. III Only 4. I and II 5. 1,II, and

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

Step: 3

blur-text-image

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

1 2 3 Data Base Techniques

Authors: Dick Andersen

1st Edition

0880223464, 978-0880223461

More Books

Students also viewed these Databases questions

Question

=+Understand the fi eld of comparative IHRM.

Answered: 1 week ago