Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

CHALLENGE ACTIVITY 7 . 9 . 2 : Constructor overloading. Write a second constructor as indicated. Sample output: User 1 : Minutes: 0 , Messages:

CHALLENGE
ACTIVITY
7.9.2: Constructor overloading.
Write a second constructor as indicated. Sample output:
User1: Minutes: 0, Messages: 0
User2: Minutes: 1000, Messages: 5000
Learn how our autograder works
528040.3489528.93zqy7
I/===== Code from file PhonePlan. java =====
public class PhonePlan {
private int freeMinutes;
private int freeMessages;
public PhonePlan(){
freeMinutes =0;
}
freeMessages =0;
// FIXME: Create a second constructor with numMinutes and numMessages parameters.
V* Your solution goes here */
public void print(){
System.out.println("Minutes: "+ freeMinutes +", Messages: "+ freeMessages);
}
Feedback?
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

With non-mutually exclusive projects

Answered: 1 week ago

Question

internationalization of business?

Answered: 1 week ago