Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(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.

image text in transcribed

image text in transcribed

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

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

Recommended Textbook for

Expert Oracle9i Database Administration

Authors: Sam R. Alapati

1st Edition

1590590228, 978-1590590225

Students also viewed these Databases questions

Question

Define Scientific Management

Answered: 1 week ago

Question

Explain budgetary Control

Answered: 1 week ago

Question

Solve the integral:

Answered: 1 week ago

Question

What is meant by Non-programmed decision?

Answered: 1 week ago

Question

5. What are the other economic side effects of accidents?

Answered: 1 week ago