Professional Documents
Culture Documents
Quiz 1 OOP
Quiz 1 OOP
Quiz
GV Phi Loan
GV Phi Loan
Bai tp 1
Create a base class with only a nondefault constructor, and a derived class with both a default (no-arg) and nondefault constructor. In the derived-class constructors, call the base-class constructor
GV Phi Loan
Bai tp 1
GV Phi Loan
Bai tp 2
Output??
GV Phi Loan
Bai tp 2
Kt qua la:
GV Phi Loan
Bai tp 3
Output????
GV Phi Loan
Private f()
8
Bai tp 3
Vi f() cua lp cha PrivateOverride la private nn bi hidden i vi lp con Derived. Phng thc private cua lp cha khng th bi override trong lp con c.
GV Phi Loan