EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
9th Edition
ISBN: 9781337671385
Author: FARRELL
Publisher: CENGAGE LEARNING - CONSIGNMENT
bartleby

Videos

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

The Twelve Days of Christmas

Program plan:

  • Import necessary package.
  • Create a class “TwelveDays”,
    • Define the method “main ()”,
      • Declare the necessary variables.
      • Assign the value returned from the method “get_Choice()”.
      • Check whether the choice is greater than or equal to “4”,
        • Set the suffix to “th”.
      • Otherwise, check whether the choice is “3”,
        • Set the suffix to “rd”.
      • Otherwise, check whether the choice is “2”,
        • Set the suffix to “nd”.
      • Otherwise,
        • Set the suffix to “st”.
      • Print the choice with the day of Christmas song.
      • Execute switch statement for the given choice,
        • If the choice is “12”,
          • Print the corresponding messages until “break” occurs.
            • If the choice is “11”,
              • Print the corresponding messages until “break” occurs.
            • If the choice is “10”,
              • Print the corresponding messages until “break” occurs.
            • If the choice is “9”,
              • Print the corresponding messages until “break” occurs.
            • If the choice is “8”,
              • Print the corresponding messages until “break” occurs.
            • If the choice is “7”,
              • Print the corresponding messages until “break” occurs.
            • If the choice is “6”,
              • Print the corresponding messages until “break” occurs.
            • If the choice is “5”,
              • Print the corresponding messages until “break” occurs.
            • If the choice is “4”,
              • Print the corresponding messages until “break” occurs.
            • If the choice is “3”,
              • Print the corresponding messages until “break” occurs.
            • If the choice is “2”,
              • Print the corresponding messages until “break” occurs.
            • If the choice is “1”,
              • Print the corresponding messages until “break” occurs.
              • Exit the switch using “break”.
            • If invalid choice entered, print invalid message by default.
    • Define the method “get_Choice()”,
      • Declare the necessary variables.
      • Assign the value entered into the dialog box.
      • Parse the input.
      • Return the choice.

Blurred answer
Students have asked these similar questions
Browse the web to locate the lyrics to the song “The Twelve Days of Christmas.” The song contains a list of gifts received for the holiday. The list is collective so that as each “day” passes, a new verse contains all the words of the previous verse, plus a new item. Write an application that displays the words to the song starting with any day the user enters. (Hint: Use a switch statement with cases in descending day order and without any break statements so that the lyrics for any day repeat all the lyrics for previous days.)
Pendant Publishing edits multi-volume manuscripts for many authors. For each volume, they want a label that contains the author’s name, the title of the work, and a volume number in the form Volume 9 of 9. For example, a set of three volumes requires three labels: Volume 1 of 3, Volume 2 of 3, and Volume 3 of 3. Design an application that reads records that contain an author’s name, the title of the work, and the number of volumes. The application must read the records until eof is encountered and produce enough labels for each work. The flowchart must include a call symbol, at the beginning, to redirect the input to the external data file.                             create a solution algorithm using pseudocode create a flowchart using RAPTOR
Pendant Publishing edits multi-volume manuscripts for many authors. For each volume, they want a label that contains the author’s name, the title of the work, and a volume number in the form Volume 9 of 9. For example, a set of three volumes requires three labels: Volume 1 of 3, Volume 2 of 3, and Volume 3 of 3. Design an application that reads records that contain an author’s name, the title of the work, and the number of volumes. The application must read the records until eof is encountered and produce enough labels for each work. Design a flowchart and psuedocode Pendant Publishing.
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
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
Text book image
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning
Text book image
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
CPP Function Parameters | Returning Values from Functions | C++ Video Tutorial; Author: LearningLad;https://www.youtube.com/watch?v=WqukJuBnLQU;License: Standard YouTube License, CC-BY