Question: Please show the output. And in Java please Phone plan given public class PhonePlan { long minutesUsed , minutesAllowed , dataUsed , dataAllowed ; boolean

Please show the output. And in Java please

Phone plan given Please show the output. And in Java please Phone plan given public

public class PhonePlan { long minutesUsed, minutesAllowed, dataUsed, dataAllowed; boolean planType; PhonePlan(long minutesAllowed,long dataAllowed,boolean planType) { this.minutesAllowed=minutesAllowed; this.dataAllowed=dataAllowed; this.planType=planType; } public String toString()//toString() method  { if(planType==true) return String.format("Pay-as-you-go Plan with "+minutesAllowed+" minutes and "+dataAllowed  +"KB remaining"); else  return String.format("Regular ("+minutesAllowed+" minute, "+(((double)dataAllowed)/(1000*1000)) +"GB data) Monthly Plan with "+minutesAllowed+" minutes remaining and "+dataAllowed+"KB remaining"); } public long getMinutesRemaining() { return (minutesAllowed-minutesUsed); } public long getDataRemaining() { return (dataAllowed-dataUsed); } public void setMinutesUsed(long minutesUsed) { this.minutesUsed=minutesUsed; } public void setDataUsed(long dataUsed) { this.dataUsed=dataUsed; } } 

class PhonePlan { long minutesUsed, minutesAllowed, dataUsed, dataAllowed; boolean planType; PhonePlan(long minutesAllowed,long

(4) The Customer class Now create a Customer object that keeps track of the customer's name (i.ee., a String), the type of cellPhone they have (i.e., a CellPhone object that you created in part 1), the type of plan that they have (i.e., a PhonePlan object that you just created), the number of callsMade so far during the month, and finally, the balance owed on their account (a float). Create a constructor that takes the customer's name, cellPhone type and phone Plan (see example in part 2). New customers should have an account balance initially equal to 0 for regular plans and $0.40 per minute purchased (ie, initial minutes allowed) for Pay-as-you-go plans. Create get and set methods for the three instance variables. Create a toString( method that displays the customer as follows: Tim Bur with a Apple iPhone 6Plus on a Pay-as-you-go Plan with 30 minutes and CKB remaining Rita Book with a BlackBerry FRIV on a Regular (100 minute 5GB data Monthly Plan with 100 minutes remaining and 500000KB remaining (4) The Customer class Now create a Customer object that keeps track of the customer's name (i.ee., a String), the type of cellPhone they have (i.e., a CellPhone object that you created in part 1), the type of plan that they have (i.e., a PhonePlan object that you just created), the number of callsMade so far during the month, and finally, the balance owed on their account (a float). Create a constructor that takes the customer's name, cellPhone type and phone Plan (see example in part 2). New customers should have an account balance initially equal to 0 for regular plans and $0.40 per minute purchased (ie, initial minutes allowed) for Pay-as-you-go plans. Create get and set methods for the three instance variables. Create a toString( method that displays the customer as follows: Tim Bur with a Apple iPhone 6Plus on a Pay-as-you-go Plan with 30 minutes and CKB remaining Rita Book with a BlackBerry FRIV on a Regular (100 minute 5GB data Monthly Plan with 100 minutes remaining and 500000KB remaining

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!