The telecommunication packages offered by the New Zealand mobile phone provider SparkPlug offer customers varying amounts...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
The telecommunication packages offered by the New Zealand mobile phone provider SparkPlug offer customers varying amounts of talk time, texts and data for different prices. a) Create Java classes that model each of the following mobile packages. Remember, it is up to you to optimise your code re-use. • The Standard package provides a mobile service keeping track of how many minutes the customer talks and the number of texts sent. o There are two functionalities for talking and texting, modelled by methods public void talk(int nMinsTalked) • public void sendTexts(int nTextSent) · These methods check if talk or text limits are reached. If so, the customer is notified via a message (printed to the console) whenever they try to talk or send texts. Limits are specified when a Standard object is created. • Data mobile packages have the same functionality as Standard, but also have data usage (and limits). There are two kinds of Data packages: Heavy and Lite. Both of these packages offer data transfer functionality, modelled by the method public void transfer(int n) which checks data limits, notifying the customer when their limit is reached (hint: the transfer method should be in Data class as parent class and inherited by Heavy and Lite classes). b) Create methods to compute the cost of talking, texting and data, appropriate to the package. • Standard package: Talk: 10C/min, text: 5/text • Data Lite package: Talk: 100/min, text: 5/text, Data: 15€/MB • Data Heavy package: Talk: 10¢/min, text: free, Data: 25€/MB c) Create the SparkPlugApp class with a main method that creates an array of mobile package objects and simulates the use of the various package functionality, calling the methods: sendText, talk and transfer. Example output: Please select a mobile phone package. 0: Talk: [0/10] Text: [0/100] 1: Talk: [0/20] Text: [0/56] Data: [0/1024] 2: Talk: [0/30] Text: [0/156] Data: [0/5120] 3: stop. 1 Talk: [0/20] Text: [0/56] Data: [0/1024] 1. Talk 2. Text 3. Data 4. Choose another plan Talk: [16/20] Text: [0/56] Data: [0/1024] Amount owing on account is: $1.60 1. Talk 2. Text 3. Data 4. Choose another plan Talk: [36/20] Text: [0/56] Data: [0/1024] Amount owing on account is: $3.60 1. Talk 2. Text 3. Data 4. Choose another plan 4 Talk: [36/20] Text: [0/56] Data: [0/1024] Amount owing on account is: $3.60 0: Talk: [0/10] Text: [0/100] 1: Talk: [36/20] Text: [0/56] Data: [0/1024] 2: Talk: [0/30] Text: [0/156] Data: [0/5120] 3: stop. 2 Talk: [0/30] Text: [0/156] Data: [0/5120] 1. Talk 2. Text 3. Data 4. Choose another plan Talk: [0/30] Text: [0/156] Data: [301/5120] Amount owing on account is: $75.25 1. Talk 2. Text 3. Data 4. Choose another plan 3 Talk: [0/30] Text: [0/156] Data: [648/5120] Amount owing on account is: $162.00 1. Talk 2. Text 3. Data 4. Choose another plan 4 Talk: [0/30] Text: [0/156] Data: [648/5120] Amount owing on account is: $162.00 0: Talk: [0/10] Text: [0/100] 1: Talk: [36/20] Text: [0/56] Data: [0/1024] 2: Talk: [0/30] Text: [0/156] Data: [648/5120] 3: stop. The telecommunication packages offered by the New Zealand mobile phone provider SparkPlug offer customers varying amounts of talk time, texts and data for different prices. a) Create Java classes that model each of the following mobile packages. Remember, it is up to you to optimise your code re-use. • The Standard package provides a mobile service keeping track of how many minutes the customer talks and the number of texts sent. o There are two functionalities for talking and texting, modelled by methods public void talk(int nMinsTalked) • public void sendTexts(int nTextSent) · These methods check if talk or text limits are reached. If so, the customer is notified via a message (printed to the console) whenever they try to talk or send texts. Limits are specified when a Standard object is created. • Data mobile packages have the same functionality as Standard, but also have data usage (and limits). There are two kinds of Data packages: Heavy and Lite. Both of these packages offer data transfer functionality, modelled by the method public void transfer(int n) which checks data limits, notifying the customer when their limit is reached (hint: the transfer method should be in Data class as parent class and inherited by Heavy and Lite classes). b) Create methods to compute the cost of talking, texting and data, appropriate to the package. • Standard package: Talk: 10C/min, text: 5/text • Data Lite package: Talk: 100/min, text: 5/text, Data: 15€/MB • Data Heavy package: Talk: 10¢/min, text: free, Data: 25€/MB c) Create the SparkPlugApp class with a main method that creates an array of mobile package objects and simulates the use of the various package functionality, calling the methods: sendText, talk and transfer. Example output: Please select a mobile phone package. 0: Talk: [0/10] Text: [0/100] 1: Talk: [0/20] Text: [0/56] Data: [0/1024] 2: Talk: [0/30] Text: [0/156] Data: [0/5120] 3: stop. 1 Talk: [0/20] Text: [0/56] Data: [0/1024] 1. Talk 2. Text 3. Data 4. Choose another plan Talk: [16/20] Text: [0/56] Data: [0/1024] Amount owing on account is: $1.60 1. Talk 2. Text 3. Data 4. Choose another plan Talk: [36/20] Text: [0/56] Data: [0/1024] Amount owing on account is: $3.60 1. Talk 2. Text 3. Data 4. Choose another plan 4 Talk: [36/20] Text: [0/56] Data: [0/1024] Amount owing on account is: $3.60 0: Talk: [0/10] Text: [0/100] 1: Talk: [36/20] Text: [0/56] Data: [0/1024] 2: Talk: [0/30] Text: [0/156] Data: [0/5120] 3: stop. 2 Talk: [0/30] Text: [0/156] Data: [0/5120] 1. Talk 2. Text 3. Data 4. Choose another plan Talk: [0/30] Text: [0/156] Data: [301/5120] Amount owing on account is: $75.25 1. Talk 2. Text 3. Data 4. Choose another plan 3 Talk: [0/30] Text: [0/156] Data: [648/5120] Amount owing on account is: $162.00 1. Talk 2. Text 3. Data 4. Choose another plan 4 Talk: [0/30] Text: [0/156] Data: [648/5120] Amount owing on account is: $162.00 0: Talk: [0/10] Text: [0/100] 1: Talk: [36/20] Text: [0/56] Data: [0/1024] 2: Talk: [0/30] Text: [0/156] Data: [648/5120] 3: stop.
Expert Answer:
Answer rating: 100% (QA)
CodeStandardjava public class Standard protected int talktime protected int textcount ... View the full answer
Related Book For
Principles of Corporate Finance
ISBN: 978-0077404895
10th Edition
Authors: Richard A. Brealey, Stewart C. Myers, Franklin Allen
Posted Date:
Students also viewed these accounting questions
-
A mobile phone service provider randomly samples customers each year to measure current satisfaction with the service provided. The following table summarizes a portion of the survey, with 100...
-
Try to remember how you reached the decision. Did you sit down and consciously think through the implications of each alternative, or did you make a decision on the basis of intuition? Did you use...
-
How often should a telecommunication firm offering cellular phone service update its database? Why?
-
Which of these statements is false? A. Assets = Liabilities + Equity B. Assets Liabilities = Equity C. Liabilities Equity = Assets D. Liabilities = Assets Equity
-
The following occurred during June at Youngs Professional Counseling. INSTRUCTIONS Analyze each transaction. Use T accounts to record these transactions and be sure to put the name of the account on...
-
In a fixed-partitioning scheme, what are the advantages of using unequal-size partitions?
-
How should a board define its optimal size? What issues influence this choice?
-
Use Holts method to create a model that minimizes the MSE for the data set. Use Solver to estimate the optimal values of and . a. What are the optimal values of and ? b. Prepare a line graph...
-
Fortes Inc. has provided the following data concerning one of the products in its standard cost system. Variable manufacturing overhead is applied to products on the basis of direct labor-hours....
-
This problem continues the Draper Consulting, Inc., situation from Problem 2-62 of Chapter 2. Start from the trial balance and the posted T-accounts that Draper Consulting, Inc., prepared at December...
-
Ace Health Insurance Inc. (AHI) offers health insurance to millions of customers in the US. AHI has created a self-service web portal for its member. Members can find their relevant health insurance...
-
Calculate the accumulated value of $10879.35 at 7.9% compounded quarterly for 6 years. How much of the amount is interest? Calculate to two decimals. Do not use commas or $ signs. Answer:
-
The heat equation, as given in the introduction, can also be rearranged to calculate the mass or temperature change for a substance. Follow the same steps used to calculate the quantity of heat...
-
The following program does not compile correctly or type check correctly using the comp compiler and type inference system. However, it is a valid Standard ML program. Modify both the comp compiler...
-
discuss why a company might want to repurchase some of its outstanding shares? What benefit could this provide for the company and for shareholders? What is the likely change that would occur to the...
-
Q3:Using the lists of common spatial and temporal scales, decide which spatial and temporal scale you would use if you wished to study each of the following physical events. Additionally, you must...
-
School of Electronics and Mechanical Engineering Technology MEC355 - Mechatronics: Pneumatics and Hydraulic Lab 2 - Cylinders - Directional Control Name: Lab Outcomes: Student # Section: Station #:...
-
What are the key elements of a system investigation report?
-
In October 2008, six-month (182-day) Treasury bills were issued at a discount of 1.4%. What is the annual yield?
-
Look again at the balance sheet for Geomorph in Problem 10. Suppose that at year-end Geomorph had $30 in cash and marketable securities. Immediately after the year-end it used a line of credit to...
-
Find the live spreadsheet for Table on this books Web site, www.mhhe.com/bma. Show how duration and volatility change if (a) The bonds coupon is 8% of face value and (b) The bonds yield is 6%....
-
The summarised income statement for the years ended 31 March 2009 and 2010 and balance sheets as at 31 March 2009 and 31 March 2010 for Boxer plc are shown below: Required: (i) Calculate the...
-
Refer to note 1 in Johnson Matthey Plcs notes on the accounts in their annual report and accounts 2011 and identify the geographical analysis by origin for 2011 and 2010 for: (a) total revenue (b)...
-
The notes and five-year income statement extracts from the financial statements of an alcoholic drinks group are shown below. Notes: The group sells alcohol-based products to consumers and operates...
Study smarter with the SolutionInn App