Question: (JAVA) We have a partially defined PhonePlan class, as shown below, where users can create phone plans by specifying the freeMinutes and freeMessages . Complete

(JAVA)

We have a partially defined PhonePlan class, as shown below, where users can create phone plans by specifying the freeMinutes and freeMessages. Complete the following code to meet the constructor requirements of the client class. To complete the code, create an overloaded constructor that takes in arguments used to set values of freeMinutes and freeMessage. The sample client code is provided below. The overloaded constructor should satisfy the creation of object userPlan2 ,as shown in the class CallPhonePlan.

(JAVA) We have a partially defined PhonePlan class, as shown below, where

users can create phone plans by specifying the freeMinutes and freeMessages. Complete

write the overloaded constructor

1 11 Code from file PhonePlan.java 2 public class PhonePlan 2 private int freeMinutes; private int freeMessages; 6 public PhonePlan() freeMinutes =0; freeMessages = 0; 10 12 / FIXME: Create a second constructor with numMinutes and numMessages parameters 13 14 Your solution goes here/ 15 16 public void print) 17 18 19 20 21 11 2 9 ", Messages: " freeMessages); System.out.println("Minutes: "freeMinutes return

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!