• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Works Too: Answer to K&B Self Test Chapter 2 No. 7

 
Katrin L├╝thi
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually, you can also (additionally to what is stated as correct answer) put in a call to "this();" as first line in the constructor public AgedP(int x).
All the components (this, (, ), are present for choosing and the space is provided, too.

It is not necessary, but doesn't do any harm and the question does not say "only chose the minimal variant". In fact, I have even heard people say it is good practice to link different constructors, so that they do not duplicate code used in another one already. If the exam has questions like this, are such things marked false?
 
Bert Bates
author
Sheriff
Posts: 8898
5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Kat,

The real exam no longer has any "fill in the blank" questions. (It used to.) In the book we do a couple of these in an attempt to roughly emulate the so-called "drag and drop" questions that ARE on the exam. The real "drag and drop" questions require that you fill every box, every time.

hth,

Bert
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic