|--Requirement description
|--Realization ideas
1. According to the inheritance logic, it is determined that all mobile phones have a mobile phone parent class, which is defined as an abstract class, in which two abstract methods are defined to realize calling and sending information.
2. According to the logic of.... has....a.. Interface, it is determined that four types are needed --- camera interface, mobile network interface, audio playback interface and video playback interface.
3. Create Sony and HTC mobile phone classes respectively, inherit mobile phone classes, and access interfaces according to requirements.
|--Code content
Parent class -- Phones1 /** 2 * @auther:: 9527 3 * @Description: Define the function of the mobile phone itself. This class is the parent class of later mobile phones. 4 * @program: oop 5 * @create: 2019-07-16 22:54 6 */ 7 public abstract class Phones { 8 //Phone 9 public abstract void call(); 10 //Send message 11 public abstract void text(); 12 //Mobile phone model 13 public abstract void type(); 14 }