ProfM_OOP2's profile picture.

Prof. Magdin Stoica

@ProfM_OOP2

All marks will be posted by Wed. Midterm marks will be posted by tomorrow.


What kind of validation control structure makes the code simpler, easier to understand? (2/2)

ProfM_OOP2's tweet image. What kind of validation control structure makes the code simpler, easier to understand? (2/2)

What kind of validation control structure makes the code simpler, easier to understand? (1/2)

ProfM_OOP2's tweet image. What kind of validation control structure makes the code simpler, easier to understand? (1/2)

Latest version of the Drawing Studio program using abstract classes, abstract methods and interfaces: bitbucket.org/profmstoica/dr…


An interface is a contract between a service provider (e.g. button) and a client of the service (e.g. window class)

ProfM_OOP2's tweet image. An interface is a contract between a service provider (e.g. button) and a client of the service (e.g. window class)

Generalization process: Concrete Thing => General Thing -> General Thing -> Abstract Thing --> (Any)thing #interfaces

ProfM_OOP2's tweet image. Generalization process: Concrete Thing => General Thing -> General Thing -> Abstract Thing --> (Any)thing #interfaces

You should not be able to created a Shape as you could ask the object to draw itself. A circle would be ok.

ProfM_OOP2's tweet image. You should not be able to created a Shape as you could ask the object to draw itself. A circle would be ok.

How to make shape objects comparable. Interfaces are the key.

ProfM_OOP2's tweet image. How to make shape objects comparable. Interfaces are the key.

Abstract classes cannot be instantiated. They are too... #abstract to exist as objects.

ProfM_OOP2's tweet image. Abstract classes cannot be instantiated. They are too... #abstract to exist as objects.

If you need to remove and insert elements often you will need a linked list collection.

ProfM_OOP2's tweet image. If you need to remove and insert elements often you will need a linked list collection.

An array associates an integer index with a value. A hash-map can associate a #key of any type with a value.

ProfM_OOP2's tweet image. An array associates an integer index with a value. A hash-map can associate a #key of any type with a value.

I wonder if this folks know we are talking about object-oriented programming and not actual horoscopes.

ProfM_OOP2's tweet image. I wonder if this folks know we are talking about object-oriented programming and not actual horoscopes.

How would an OO horoscope look like that doesn't not store predictions in a multi-dim array?

ProfM_OOP2's tweet image. How would an OO horoscope look like that doesn't not store predictions in a multi-dim array?

Company directory as a multi-dimensional array: #not an OO solution. Has many limitations

ProfM_OOP2's tweet image. Company directory as a multi-dimensional array: #not an OO solution. Has many limitations

Organizing predictions by zodiac signs using a two-dimensional array plus a single-dimensional array of counters

ProfM_OOP2's tweet image. Organizing predictions by zodiac signs using a two-dimensional array plus a single-dimensional array of counters

(2/2) To #easily and #safely iterate through an array you use a for-each loop.

ProfM_OOP2's tweet image. (2/2) To #easily and #safely iterate through an array you use a for-each loop.

(1/2) To iterate through an array, to go through all its elements you can use a for loop.

ProfM_OOP2's tweet image. (1/2) To iterate through an array, to go through all its elements you can use a for loop.

A jagged arrays is called jagged because each of the array elements can have different dimensions.

ProfM_OOP2's tweet image. A jagged arrays is called jagged because each of the array elements can have different dimensions.

If an array is box of variables of a given type. What is a multi-dimensional array? An array of "array variables".

ProfM_OOP2's tweet image. If an array is box of variables of a given type. What is a multi-dimensional array? An array of "array variables".

The elements of an array must all be the same type. How do arrays of polymorphic objects work? Array of references.

ProfM_OOP2's tweet image. The elements of an array must all be the same type. How do arrays of polymorphic objects work? Array of references.

Loading...

Something went wrong.


Something went wrong.