please help

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

please help

Post by answerhappygod »

please help
Please Help 1
Please Help 1 (70.46 KiB) Viewed 32 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.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply