프로그램/Java - 정보 / / 2011. 5. 11. 09:22

Questions and Exercises: Object-Oriented Programming Concepts

반응형

Answers to Questions and Exercises: Object-Oriented Programming Concepts

Answers to Questions

  1. Real-world objects contain state and behavior.

  2. A software object's state is stored in fields.

  3. A software object's behavior is exposed through methods.

  4. Hiding internal data from the outside world, and accessing it only through publicly exposed methods is known as data encapsulation.

  5. A blueprint for a software object is called a class.

  6. Common behavior can be defined in a superclass and inherited into a subclass using the extends keyword.

  7. A collection of methods with no implementation is called an interface.

  8. A namespace that organizes classes and interfaces by functionality is called a package.

  9. The term API stands for Application Programming Interface.

Answers to Exercises

1. Create new classes for each real-world object that you observed at the beginning of this trail. Refer to the Bicycle class if you forget the required syntax.

* Your answers will vary depending on the real-world objects that you are modeling.


2. For each new class that you've created above, create an interface that defines its behavior, then require your class to implement it. Omit one or two methods and try compiling. What does the error look like?

* Your answers will vary here as well, but the error message will specifically list the required methods that have not been implemented.
반응형

'프로그램 > Java - 정보' 카테고리의 다른 글

우분투에 java 설치 하기  (0) 2014.03.03
JAVA MVC 정보  (0) 2011.06.23
Naver API 연동 + JAVA 사용 방법  (0) 2011.05.24
자바 8개 리스너  (0) 2011.05.19
자바스터디 블로그  (0) 2011.05.06
  • 네이버 블로그 공유
  • 네이버 밴드 공유
  • 페이스북 공유
  • 카카오스토리 공유