Forums Hà Nội Aptech
Bạn có muốn phản ứng với tin nhắn này? Vui lòng đăng ký diễn đàn trong một vài cú nhấp chuột hoặc đăng nhập để tiếp tục.
Tìm kiếm
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» TUYỂN SINH KHÓA ĐÀO TẠO LUVINA ACADEMY X/2014 (Hệ Sơ cấp)
CHAPTER 7 ASSIGNMENT - LEARN JAVA BY EXAMPLE EmptyFri Jan 10, 2014 5:08 pm by trangan

» Luvina - Tuyển sinh Luvina Academy IX/2013
CHAPTER 7 ASSIGNMENT - LEARN JAVA BY EXAMPLE EmptyTue Apr 09, 2013 2:21 pm by trangan

» LUVINA ACADEMY VIII TUYỂN SINH 2012
CHAPTER 7 ASSIGNMENT - LEARN JAVA BY EXAMPLE EmptyMon Sep 17, 2012 3:16 pm by trangan

» Tuyển sinh khóa học lập trình viên_Luvina Academy VII (Hệ sơ cấp)
CHAPTER 7 ASSIGNMENT - LEARN JAVA BY EXAMPLE EmptyTue Jul 10, 2012 7:01 pm by trangan

» Xin đề thi thực hành,lý thuyết và đáp án của môn Developing Web Services with Java
CHAPTER 7 ASSIGNMENT - LEARN JAVA BY EXAMPLE EmptyTue Jan 10, 2012 12:58 pm by JinHoVN

» Nhờ các PRO vào làm giúp kái đề PCS này với
CHAPTER 7 ASSIGNMENT - LEARN JAVA BY EXAMPLE EmptyFri Jan 06, 2012 1:06 pm by phongvan1991

» Đề cương ôn tập môn CF
CHAPTER 7 ASSIGNMENT - LEARN JAVA BY EXAMPLE EmptyThu Nov 10, 2011 8:20 pm by thanhnc_b01392

» xin slide môn C
CHAPTER 7 ASSIGNMENT - LEARN JAVA BY EXAMPLE EmptySun Sep 04, 2011 5:33 pm by anhchang064

» Drugs In Japan
CHAPTER 7 ASSIGNMENT - LEARN JAVA BY EXAMPLE EmptyTue Aug 02, 2011 5:58 am by Khách viếng thăm

Affiliates
free forum

May 2024
MonTueWedThuFriSatSun
  12345
6789101112
13141516171819
20212223242526
2728293031  

Calendar Calendar

Affiliates
free forum


CHAPTER 7 ASSIGNMENT - LEARN JAVA BY EXAMPLE

Go down

CHAPTER 7 ASSIGNMENT - LEARN JAVA BY EXAMPLE Empty CHAPTER 7 ASSIGNMENT - LEARN JAVA BY EXAMPLE

Bài gửi  Admin Mon Aug 23, 2010 10:12 pm

Exercise 11-1. Create a base class, Telephone, and derive a class ElectronicPhone from it. In Telephone, create a protected string member phonetype, and a public method Ring( ) that outputs a text message like this: "Ringing the ." In ElectronicPhone, the constructor should set the phonetype to "Digital." In the Run( ) method, call Ring( ) on the ElectronicPhone to test the inheritance.
Exercise 11-2. Extend Exercise 11-1 to illustrate a polymorphic method. Have the derived class override the Ring( ) method to display a different message.
Exercise 11-3. Change the Telephone class to abstract, and make Ring( ) an abstract method. Derive two new classes from Telephone: DigitalPhone and TalkingPhone. Each derived class should set the phonetype, and override the Ring( ) method.


Lời giải: [You must be registered and logged in to see this link.]
Admin
Admin
Admin
Admin

Tổng số bài gửi : 31
Join date : 23/08/2010
Age : 35
Đến từ : Hà Nội 5

https://hn-aptech.forumvi.com

Về Đầu Trang Go down

Về Đầu Trang

- Similar topics

 
Permissions in this forum:
Bạn không có quyền trả lời bài viết