Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Assume there is a class Phone with a private attribute named model . Write a method named someMethod for the Phone class that accepts a
Assume there is a class Phone with a private attribute named model. Write a method named someMethod for the Phone class that accepts a Phone object as its parameter and returns a number based on the model of the passed parameter as follows:
if the model is Apple return 1, if the model is Samsung return 2 , otherwise return 3.
in Java
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started