Prof. Magdin Stoica
@ProfM_OOP2
Anda mungkin suka
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)
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)
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.
How to make shape objects comparable. Interfaces are the key.
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.
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?
Organizing predictions by zodiac signs using a two-dimensional array plus a single-dimensional array of counters
(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.
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.
United States Tren
- 1. $NVDA 81K posts
- 2. Jensen 26.5K posts
- 3. Peggy 38.7K posts
- 4. GeForce Season 6,236 posts
- 5. NASA 56.1K posts
- 6. Sam Harris N/A
- 7. #YIAYalpha N/A
- 8. Arabic Numerals 5,890 posts
- 9. Martha 20.7K posts
- 10. Sumrall 2,596 posts
- 11. Stargate 7,672 posts
- 12. Judge Smith 4,348 posts
- 13. Potomac N/A
- 14. Comey 59.3K posts
- 15. WNBA 9,671 posts
- 16. Kwame 6,617 posts
- 17. #2Kgiveaway 1,255 posts
- 18. #WickedWaysToMakeABuck N/A
- 19. Tarris Reed N/A
- 20. Poverty 55.6K posts
Something went wrong.
Something went wrong.