Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

in Java, 39) Code a constructor for the Date described below. The constructor has three arguments: public class Date { private int month; // 1-12

in Java,

39) Code a constructor for the Date described below. The constructor has three arguments:

public class Date

{

private int month; // 1-12

private int day; // 1-31 based on month

public int Year ;

// constructor: use property Month to confirm proper value for month;

// use property Day to confirm proper value for day

}

40. Given the class Vector3 as coded below and the constructor Vector3 with the header shown. Demonstrate the use of this keyword within the constructor code?

class Vector3

{

float x;

float y;

float z;

public Vector3 (float x, float y, float z)

Answer

public Vector3 (float x, float y, float z)

{

//put your answer here

}

}

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

Decisions Based On Data Analytics For Business Excellence

Authors: Bastian Weber

1st Edition

9358681683, 978-9358681680

More Books

Students also viewed these Databases questions

Question

Is SHRD compatible with individual career aspirations

Answered: 1 week ago