Page 1 of 1

please help

Posted: Fri May 20, 2022 12:55 pm
by answerhappygod
please help
Please Help 1
Please Help 1 (70.46 KiB) Viewed 34 times
Define a java structure (code) that can represent Smartphone. It must have a model attribute. Smart Phone must have send Message method. By default, sendMessage displays the text "Message sent". A general Smartphone should not be able to be instantiated. Define also two classes, Android Phone and iOSPhone that are SmartPhones. Both classes should define the model attribute and features of a SmartPhone. In each class, the sendMessage method specify the source mobile in the displayed message. (ie Message sent from Android phone) For common SmartPhone features, define a structure SmartPhoneFeature that indicates SmartPhone common feature like camera method. Both Android Phone and iOSPhone have camera. The specific behavior when instances of either class Camera is to display for: Android Phone object: "13MP camera" IOSPhone object: "8Mp camera". Instances of either AndroidPhone or IOSPhone should be able to be stored in a variable of type SmartPhone Feature.