Home > other >  o
o

Time:09-27

Object-oriented
1. Smart phone's default language is English, but you can make the phone sets the default language to Chinese, to write mobile phone class with no arguments constructor, said to use the default language design, use and construction method, modified the phone's default language output effect is as follows:
Smartphone is the default language English
Sets the smartphone's default language to Chinese

The second topic
Create credit card type, and create a constructor for the class, the constructor has three parameters, the self, card number and password, the password can be set to a default value of 123456, representing the default password, if you do not specify a password when creating a class that is using the default password reset password, otherwise effect is as follows:
Credit card 4013222222 default password is 123456
The password reset credit card 4013222222 to 168779

CodePudding user response: