Structure and Making Decisions

In this assignment, you will analyze sequence, selection, and loop, the relational comparison operators, precedence when combining AND and OR operators, and the case structure. Instructions: Part I. 1. Design a program in which, from a date entered by the keyboard with the format DAY, MONTH, YEAR, the date of the following day is obtained. 2. Write a program that asks the user to enter two numbers. If the first number entered exceeds the second number, the program must print "The first number is the largest"; otherwise, the program must print the message "The first number is the smallest." Consider the case that both numbers are equal and print the corresponding message. 3. Write a program that simulates the normal operation of a modern elevator with 25 floors (levels) and that has two buttons: UP and DOWN, except on the lower floor (level), there is only a call button to UP and the last floor (level) that only exists DOWN button. 4. Write a program that selects the arithmetic operation to be executed between two numbers depending on the value of a variable called selection. 5. Write an algorithm that displays the next double message: Enter a month (1 for January, 2 for February,….…) Enter a day of the month CIS216 – Programming Principles Structure and Making Decisions Copyright 2022 Post University, ALL RIGHTS RESERVED The algorithm accepts and stores a number in the "month" variable in response to the first question and accepts and stores a number in the "day" variable in response to the second question. If the month entered is not between 1 and 12 inclusive, an information message should be displayed to the user warning that the number entered is not valid as a month; in the same way, we proceed with the number that represents the day of the month if it is not in the range between 1 and 31. Modify the algorithm to alert the user to no enter numbers with decimals. Part II. 1. In the following pseudocode, what percentage raise will an employee in Department 8 receive? if department < 5 then raise = SMALL_RAISE else if department < 14 then raise = MEDIUM_RAISE else if department < 9 then raise = BIG_RAISE endif endif endif 2. Design a flowchart or pseudocode for a program that accepts two numbers from a user and displays one of the following messages: First is larger, second is larger, and numbers are equal. 3. Cecilia’s Boutique wants several lists of salesperson data. Design a flowchart or pseudocode for the following: a. A program that accepts one salesperson’s ID number, number of items sold in the last month, and the total value of the items and displays data message only if the salesperson is a high performer—defined as a person who sells more than 200 items in the month. Copyright 2022 Post University, ALL RIGHTS RESERVED b. A program that accepts the salesperson’s data and displays a message only if the salesperson is a high performer—defined as a person who sells more than 200 items worth at least $1,000 monthly. 4. The Dash Cell Phone Company charges customers a basic rate of $5 per month to send text messages. Additional rates are as follows: • The first 100 messages per month, regardless of message length, are included in the basic bill. • An additional three cents are charged for each text message after the 100th message, up to 300. • An additional cents are charged for each text message after the 300th message. • Federal, state, and local taxes add 14 percent to each bill. Design a flowchart or pseudocode for the following: a. A program that accepts data about one customer’s messages: area code (three digits), phone number (seven digits), and several text messages sent. Display all the data, including the month-end bill, before and after taxes are added. b. A program that continuously accepts data about text messages until a sentinel value is entered and displays all the details c. A program that continuously accepts data about text messages until a sentinel value is entered and displays details only about customers who send more than 100 text messages. d. A program that continuously accepts data about text messages until a sentinel value is entered and displays details only about customers whose total bill with taxes is over $10. A program that prompts the user for a three-digit area code to select bills. Then the program continuously accepts text message data until a sentinel value is entered and displays data only for messages sent from the specified area code. 5. Black Dot Printing is attempting to organize carpools to save energy. Each input record contains an employee’s name and town of residence. Ten percent of the company’s employees live in Wonder Lake; 30 percent live in the adjacent town of Woodstock. Black Dot wants to encourage employees who live in either town to drive to work together. Design a flowchart or pseudocode for the following: Copyright 2022 Post University, ALL RIGHTS RESERVED a. A program that accepts an employee’s data and displays it with a message that indicates whether the employee is a candidate for the carpool (because he lives in one of the two cities). b. A program that continuously accepts employee data until a sentinel value is entered and displays a list of all employees who are carpool candidates. Make sure the decision-making process is as efficient as possible. c. A program that continuously accepts employee data until a sentinel value is entered displays a list of all employees who are ineligible to carpool because they do not live in either Wonder Lake or Woodstock. Make sure the decision-making process is as efficient as possible. Requirements: • Show your work in a Word document. o, Include all your work for each question. o You can include screenshots of work done on paper. • For all justification exercises, remember to use the definitions and principles we have learned thus far for all justification exercises. • You must prepare a written work where you respond to the programming exercises. The work must comply with APA academic writing standards. You must support your answer using appropriate sources that are properly cited. • Minimum four pages in length, excluding the Title and Reference page. • APA format, including an in-text citation for referenced works. • At least three resources.


The amount showing for paying is the amount I only have until next or next month.

Question Attachments

0 attachments —

Pending
Computer Science Assignment Help / Programming Assignment Help
17 Mar 2023
Due Date: 18 Mar 2023

Report As Dispute

Share Your Feedback

Give Review : A+ A B C D F