Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

40. Assume that datel and date2 are objects of class IncDate as defined in Sec- tion 1.4. What would be the output of the following

image text in transcribed
image text in transcribed
image text in transcribed
40. Assume that datel and date2 are objects of class IncDate as defined in Sec- tion 1.4. What would be the output of the following code? datel new IncDate(5. 5. 2000): date2 datel: System.out.println(datel): 5,5, 2010 ME System.out.println(date2): 5,5 euro datel. increment(); System.out.println(datel): 5 6, 2010 System.out.println(date2):5.5.2011 42. Assume that datel and date2 are objects of class IncDate as defined in Sec- tion 1.4. What would be the output of the following code? datel new IncDate(5. 5. 2000): date2 new IncDate(5. 5. 2000): 28. Given the definitions of the Date and IncDate classes in this chapter, and the following declarations V int temp: Date datel = new Date(10.2.1989): Date date2 = new Date(4.2.1992): IncDate date3 = new IncDate(12.25.2001): indicate which of the following statements are illegal, and which are legal. Explain your answers. a. temp datel.getDay (: b. temp = date3.getYear(): c. datel.incremento: d. date3.increment: e. date2 = datel: V f. date2 date3: g. date3 = date2: X

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

Medical Image Databases

Authors: Stephen T.C. Wong

1st Edition

1461375398, 978-1461375395

More Books

Students also viewed these Databases questions