I'm learning java in college and I missed one homework assignment. Since then it has been difficult to keep up with homework because they were based on the one I missed. Here's the prompt: Design a class Phone with one data member as long phoneNumber. Add constructors, get/set methods to class Phone. Then design a class InternationalPhone as subclass of class Phone, with one extra data member as int countryCode. Add constructors, get/set methods to class InternationalPhone. Write a main program to test these two classes. (We use netbeans btw)
I'm learning java in college and I missed one homework assignment. Since then it has been difficult to keep up with homework because they were based on the one I missed.
Here's the prompt:
Design a class Phone with one data member as long phoneNumber. Add constructors, get/set methods to class Phone. Then design a class InternationalPhone as subclass of class Phone, with one extra data member as int countryCode. Add constructors, get/set methods to class InternationalPhone. Write a main
(We use netbeans btw)
I can't get any credit for this so there's no rush but I would be very happy to recieve an answer before the end of the semester. Thank you in advance :)
Trending now
This is a popular solution!
Step by step
Solved in 3 steps