Mindtap Programming, 1 Term (6 Months) Printed Access Card For Farrell's Java Programming, 9th
Mindtap Programming, 1 Term (6 Months) Printed Access Card For Farrell's Java Programming, 9th
9th Edition
ISBN: 9781337397117
Author: FARRELL, Joyce
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
Modular Program Structure. Analysis of Structured Programming Examples. Ways to Reduce Coupling. Based on the given problem, create an algorithm and a block diagram, and write the program code: Function: y=xsin⁡x Interval: [0,π] Requirements: Create a graph of the function. Show the coordinates (x and y). Choose your own scale and show it in the block diagram. Create a block diagram based on the algorithm. Write the program code in Python. Requirements: Each step in the block diagram must be clearly shown. The graph of the function must be drawn and saved (in PNG format). Write the code in a modular way (functions and the main part should be separate). Please explain and describe the results in detail.
Based on the given problem, create an algorithm and a block diagram, and write the program code: Function: y=xsin⁡x Interval: [0,π] Requirements: Create a graph of the function. Show the coordinates (x and y). Choose your own scale and show it in the block diagram. Create a block diagram based on the algorithm. Write the program code in Python. Requirements: Each step in the block diagram must be clearly shown. The graph of the function must be drawn and saved (in PNG format). Write the code in a modular way (functions and the main part should be separate). Please explain and describe the results in detail.
Based on the given problem, create an algorithm and a block diagram, and write the program code: Function: y=xsin⁡x Interval: [0,π] Requirements: Create a graph of the function. Show the coordinates (x and y). Choose your own scale and show it in the block diagram. Create a block diagram based on the algorithm. Write the program code in Python. Requirements: Each step in the block diagram must be clearly shown. The graph of the function must be drawn and saved (in PNG format). Write the code in a modular way (functions and the main part should be separate). Please explain and describe the results in detail.
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,
Text book image
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
Text book image
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
Text book image
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781305480537
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Java random numbers; Author: Bro code;https://www.youtube.com/watch?v=VMZLPl16P5c;License: Standard YouTube License, CC-BY