Perfect Developer basic tutorial 2 | This page last modified 2011-10-29 (JAC) |
1. What might the expression myObject.someName
represent?
someName
of object
myObject
? someName
of object
myObject
?c. When calling a function with no parameters, Perfect neither requires nor allows an empty parameter list.
2. If I have declared a class called MyContainer
with a default
constructor, which of the following is the correct expression to yield an object
that type, using the default constructor?
MyContainer
MyContainer()
MyContainer{}
(c). The name MyContainer
by itself
is a valid type
expression. However, to indicate a call to one of its constructors you need to
append a parameter list.
Perfect uses curly brackets for constructor
parameter lists (whether empty or not), and it uses round brackets for other parameter
lists that are not empty.