These are flashcards an notes made by students on topics like 'year', 'video' and 'attribute', originating from:

- Michael Jesse Chonoles
ISBN-10 0128096403 ISBN-13 9780128096406
1335 Flashcards & Notes
  • This + 400k other summaries, also in PDF!
  • A unique study and practice tool
  • Never study anything twice again
  • Get the grades you hope for
  • 100% sure, 100% understanding
Remember faster, study better. Scientifically proven.
Trustpilot Logo

Study Cards on year, video, attribute

Sometimes, if there are many elements with same named attribute, it becomes difficult to ...?
Sometimes, if there are many elements with same named attribute, it becomes difficult to refer to the correct one.

This could be in speech or in writing a constraint on the value.
Report

  • If we want to refer to the year attribute on Book, we would say .....?

  • To refer to the year attribute on the Video class, we would say .....?

  • If we want to refer to the slot on a book instance, we would use the name of the object, for example, ....? or ....?
Imagine that there is a Video class that also has a year attribute.

  • If we want to refer to the year attribute on Book, we would say “Book.year.”

  • To refer to the year attribute on the Video class, we would say “Video.year.”

  • If we want to refer to the slot on a book instance, we would use the name of the object, for example, “myBook.year” or “myVideo.year.”
Report
If we wanted to refer to the operation, borrow(), that might appear on both the Book and Video class.

We would refer to the operation as ......   ? and .....?

If we wanted to invoke the borrow operation on the myBook instance or on the myVideo instance, we would, in a similar manner, use .....? and .....?
This the exact approach also used to refer to a behavioral member of a class.

If we wanted to refer to the operation, borrow(), that might appear on both the Book and Video class.

We would refer to the operation as “Book.borrow()” and “Video.borrow().”

If we wanted to invoke the borrow operation on the myBook instance or on the myVideo instance, we would, in a similar manner, use myBook.borrow() and myVideo.borrow().
Report
  • Higher grades + faster learning
  • Don't study anything twice
  • 100% sure, 100% understanding
Discover Study Smart