Java Programming, Loose-leaf Version
Java Programming, Loose-leaf Version
8th Edition
ISBN: 9781337685917
Author: Joyce Farrell
Publisher: Cengage Learning
bartleby

Videos

Question
Book Icon
Chapter 5, Problem 4PE
Program Plan Intro

Recommendation of recharge plan

Program plan:

  • Import a necessary package.
  • Create a class “CellPhoneService”,
    • Define the method “main()”,
      • Declare and initialize the necessary variables.
      • Get the talk minutes entered into the first dialog box.
      • Assign the integer value returned from the method “parseInt()”.
      • Get the number of text messages entered into the second dialog box.
      • Assign the integer value returned from the method “parseInt()”.
      • Get the gigabytes of data entered into the third dialog box.
      • Assign the integer value returned from the method “parseInt()”.
      • Check whether the data balance is greater than “0”,
        • Check whether the data balance is less than or equal to the minimum data balance,
          • If it is true, set the plan to “E”.
          • Assign the price for the plan “E”.
        • Otherwise,
          • Set the plan to “F”.
          • Assign the price for the plan “F”.
      • Otherwise, check whether the required talk minutes is less than the minimum talk minutes,
        • If it is true, check whether the number of required text messages is “0” and required data balance is “0”,
          • If it is true, set the plan to “A”.
          • Assign the price for the plan “A”.
        • Otherwise,
          • Set the plan to “B”.
          • Assign the price for the plan “B”.
      • Otherwise, check whether the required number of text message is less than the minimum number of text messages,
        • If it is true, set the plan to “C”.
        • Assign the price for the plan “C”.
      • Otherwise,
        • Set the plan to “D”,
        • Assign the price for the plan “D”.
      • Concatenate the string with the determined plan and price.
      • Display the plan message in dialog box.

Blurred answer
Students have asked these similar questions
I need help in server client project. It is around 1200 lines of code in both . I want to meet with the expert online because it is complicated. I want the server send a menu to the client and the client enters his choice and keep on this until the client chooses to exit . the problem is not in the connection itself as far as I know.I tried while loops but did not work. please help its emergent
I need help in my server client in C language
Exercise docID document text docID document text 1 hot chocolate cocoa beans 7 sweet sugar 2345 9 cocoa ghana africa 8 sugar cane brazil beans harvest ghana 9 sweet sugar beet cocoa butter butter truffles sweet chocolate 10 sweet cake icing 11 cake black forest Clustering by k-means, with preprocessing tokenization, term weighting TFIDF. Manhattan Distance. Number of cluster is 2. Centroid docID 2 and docID 9.
Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Text book image
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
Text book image
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
Java random numbers; Author: Bro code;https://www.youtube.com/watch?v=VMZLPl16P5c;License: Standard YouTube License, CC-BY