[exit Q&A]

Questions and Answers
I don’t have a strong feel of what or how to enter fields as apposed to methods and types of methods. I will work on the lab but if you could give me some advice on how to start and check.

How about looking at the examples we have in the lecture notes and find there how fields and methods are defined?

I have difficulty in identifying the different between variable and object. could you help me by giving an example ?

Each data type offers a distinguished set of values. For instance, the ‘int’ type offers values like 10, -55, and 12345. Similarly, the ‘long’ data type offers values like 52L and -987L.

In the case of non-primitive data types, the values are said to be objects. To get a value, that is an object, of a class type Foo one needs to use instructions of the form ‘new Foo(...)’.

A variable is a named storage place where values can be recorded. For instance, ‘int i’ introduces a variable named ‘i’ where integer values can be stored. On the other hand, the instruction ‘Foo x’ introduces a variable named ‘x’ where objects of type Foo can be stored.

The storing of values is achieved with assignment instructions. For instance, ‘i = 68’ and ‘x = new Foo(...)’.

Do I have to put number of class fields, instance fields, etc precisely what’s been told in the assignment?

Yes, please.

can I put more?

No.