Question

CIST 1305 – Program Design and Development Chapter 4 Assignment #7 [Decisions/If Statements & Loops] (50...

CIST 1305 – Program Design and Development

Chapter 4

Assignment #7

[Decisions/If Statements & Loops]

(50 Points)

Please do the following exercises:

  1. Pastoral College is a small college in the Midwest. Design the pseudo-code for a program that accepts a student name, major field of study, and grade point average. Display a student’s data with the message “Dean’s list” if the student’s grade point average is above 3.5, “Academic probation” if the grade point average is below 2.0, and no message if the grade point average is between 2.0 and 3.5 inclusive.
  1. The Summerville Telephone Company charges 20 cents per minute for all calls outside the customer’s area code. All other calls are 15 cents per minute. Design the pseudo-code for a program that accepts data about a phone call: customer area code (three digits), customer phone number (seven digits), called area code (three digits), called number (seven digits), and call time in minutes (four digits). Display the calling number, called number, and price for the call.
  1. Design an application that will convert either Fahrenheit to Celsius or Celsius to Fahrenheit. Have the user enter a 1 to convert Fahrenheit to Celsius and a 2 for Celsius to Fahrenheit. If the user enters any other number, output an error message. Once the user enters a 1, do the input, calculation and output for a Fahrenheit to Celsius conversion. If the user enters a 2, do the input, calculation and output for a Celsius to Fahrenheit conversion. Also write the pseudo-code.

  1. Design an application that will Calculate the area of a Shape. Have the user enter a “C” to use a Circle, an “S” to use a Square and an “R” to use a Rectangle. If the user enters any other letter or number, output an error message. Once the user enters a “C”, do the input, calculation and output to Calculate the area of a Circle. If the user enters an “S”, do the input, calculation and output to Calculate the area of a Square. If the user enters an “R”, do the input, calculation and output to Calculate the area of a Rectangle. Also write the pseudo-code.
  1. Design the pseudocode/flowchart for a program that outputs numbers in reverse order from 10 down to 1. Your output should go to the console window. Use a loop with step -1.
  1. Design the pseudocode/flowchart for a program that uses a while loop to output numbers between 0 and 100, stepping by 5. (ie. 0, 5, 10, 15…) Your output should go to the console window.
  1. Write the pseudo-code/flowchart for an application that calculates the Celsius equivalent to Fahrenheit Temperatures. The Fahrenheit temps should start at 0 and go up to 300, incrementing 20 each time through the loop.(Formula is: Celsius = (Fahrenheit-32.0) * (5.0/9.0)). Your output should be displayed on the Console Window. Don’t worry about formatting the Celsius data.

Sample Output:

Fahrenheit Celsius

  1. -17.8
  1. -6.7
  1. 4.4

.

.

.

  1. 148.9

Please I need the answer for question 5,6,7.

Thanks for your help

I need the answer for question 5, 6, 7. thanks

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Pastoral College is a small college in the Midwest. Design the pseudo-code for a program that accepts a student name, major field of study, and grade point average. Display a student’s data with the message “Dean’s list” if the student’s grade point average is above 3.5, “Academic probation” if the grade point average is below 2.0, and no message if the grade point average is between 2.0 and 3.5 inclusive.

PSEUDOCODE STUDENT()

  1. Input Student Name to NAME
  2. Input the Major_field to MAJOR
  3. Input the grade_point to GPA
  4. Write : Name
  5. Write : MAJOR
  6. Write : GPA
  7. If(GPA > 3.5)

Write : “Dean’s List”

Else If(GPA <2.0)

     Write : “Academic Probation”

[End of If]       

  1. RETURN

The Summerville Telephone Company charges 20 cents per minute for all calls outside the customer’s area code. All other calls are 15 cents per minute. Design the pseudo-code for a program that accepts data about a phone call: customer area code (three digits), customer phone number (seven digits), called area code (three digits), called number (seven digits), and call time in minutes (four digits). Display the calling number, called number, and price for the call.

PROCEDURE PHONE_CALL()

  1. Input Customer area code to Ccode
  2. Input Customer Phone Number to Cphone
  3. Input Called area code to Call_Code
  4. Input Called Phone Number to Call_Phone
  5. Input Call time to Ctime
  6. Write : “Customer Number” + Ccode+Cphone
  7. Write : “Called Number “+Call_Code+Call_Phone
  8. Write : “Call Time “+ Ctime
  9. If(Ccode = Call_Code)

Price = Ctime * 15

Else

Price = Ctime * 20

          [end of if]

  1. Write : “Call Charge “ + Price + “Cents”
  2. Return

Design an application that will convert either Fahrenheit to Celsius or Celsius to Fahrenheit. Have the user enter a 1 to convert Fahrenheit to Celsius and a 2 for Celsius to Fahrenheit. If the user enters any other number, output an error message. Once the user enters a 1, do the input, calculation and output for a Fahrenheit to Celsius conversion. If the user enters a 2, do the input, calculation and output for a Celsius to Fahrenheit conversion. Also write the pseudo-code.

PSEUDOCODE TEMPERATURE()

  1. Write : “1. Fahrenheit to Celcius 2. Celsius to Fahrenheit”
  2. Input Choice to ch
  3. If(ch=1)

Input “Temperature in Fahrenheit” to temp

Celcius = (temp – 32) /1.8;

Write : “Temperature in celcius “ + Celcius

Else if(ch=2)

Input “Temperature in Celcius” to temp

Fahrenheit = (temp * 1.8) + 32;

Write : “Temperature in Fahrenheit “ + Fahrenheit

Else

Write : “Invalid Choice”

[END OF IF]

  1. RETURN

Design an application that will Calculate the area of a Shape. Have the user enter a “C” to use a Circle, an “S” to use a Square and an “R” to use a Rectangle. If the user enters any other letter or number, output an error message. Once the user enters a “C”, do the input, calculation and output to Calculate the area of a Circle. If the user enters an “S”, do the input, calculation and output to Calculate the area of a Square. If the user enters an “R”, do the input, calculation and output to Calculate the area of a Rectangle. Also write the pseudo-code.

PSEUDOCODE AREA()

  1. WRITE :”C. CIRCLE S.SQUARE R: RECTANGLE”
  2. WRITE “ Enter your choice to find the area”
  3. Input : choice
  4. If(choice = ‘C’)
  5. Input Radius to r
  6. Area = 3.141 * r*r;
  7. Write “ Area of circle” + Area+” Sq. Units.”
  8. Else
  9. If(choice = ‘S’)
  10. Input side of square to s
  11. Area = s*s
  12. Write “Area of Square “ + Area+” Sq. Units.”
  13. Else
  14. If(choice = ‘R’)
  15. Input the Length of rectangle to L
  16. Input the Width of rectangle to w
  17. Area = l*w
  18. Write : “Area of rectangle “   + Area + “Sq. Units”
  19. Else
  20. Write “Invalid choice”
  21. [End of IF]
  22. RETURN

Design the pseudocode/flowchart for a program that outputs numbers in reverse order from 10 down to 1. Your output should go to the console window. Use a loop with step -1.

PSEUDOCODE PRINT()

  1. REPEAT FOR I = 10 TO 1 BY -1
  2. WRITE : I
  3. [END OF LOOP]

Design the pseudocode/flowchart for a program that uses a while loop to output numbers between 0 and 100, stepping by 5. (ie. 0, 5, 10, 15…) Your output should go to the console window.

PSEUDOCODE PRINT()

  1. SET I <- 0
  2. REPEAT WHILE(I<=100)
  3. WRITE : I
  4. I<=I+5
  5. [END OF LOOP]

Write the pseudo-code/flowchart for an application that calculates the Celsius equivalent to Fahrenheit Temperatures. The Fahrenheit temps should start at 0 and go up to 300, incrementing 20 each time through the loop.(Formula is: Celsius = (Fahrenheit-32.0) * (5.0/9.0)). Your output should be displayed on the Console Window. Don’t worry about formatting the Celsius data.

PSEUDOCODE TEMPERATURE()

  1. SET I<- 0
  2. REPEAT WHILE(I<=300)

Celcius = (I – 32) /1.8;

Write : I,Celcius

I <- I+20

[END OF LOOP]

  1. RETURN

Add a comment
Know the answer?
Add Answer to:
CIST 1305 – Program Design and Development Chapter 4 Assignment #7 [Decisions/If Statements & Loops] (50...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • The purpose of this assignment is to get experience with an array, do while loop and...

    The purpose of this assignment is to get experience with an array, do while loop and read and write file operations. Your goal is to create a program that reads the exam.txt file with 10 scores. After that, the user can select from a 4 choice menu that handles the user’s choices as described in the details below. The program should display the menu until the user selects the menu option quit. The project requirements: It is an important part...

  • In this project you will create a console C++ program that will have the user to...

    In this project you will create a console C++ program that will have the user to enter Celsius temperature readings for anywhere between 1 and 365 days and store them in a dynamically allocated array, then display a report showing both the Celsius and Fahrenheit temperatures for each day entered. This program will require the use of pointers and dynamic memory allocation. Getting and Storing User Input: For this you will ask the user how many days’ worth of temperature...

  • please use flowgorithm program to do the flowchrat. those are the data that are in the...

    please use flowgorithm program to do the flowchrat. those are the data that are in the question. - w each bill. Design a flowchart or pseudocode for the following: A program that accepts the following data about one customer's messages: area code (three digits), phone number (seven digits), and number of text. messages sent. Display all the data, including the month-end bill both before and after taxes are added. 6. The Dash Cell Phone Company charges customers a basic rate...

  • answer the following using C# Design and program a Visual Studio Console project in C# that...

    answer the following using C# Design and program a Visual Studio Console project in C# that allows your user to enter a number. The program will examine the number to see if it is prime. If it is prime, it will print the next higher prime and the next lower primes to the console. If the number entered by the user is not prime, display a message to that effect. All code should be written by you. Do not copy/paste...

  • c++ CSI Lab 6 This program is to be written to accomplish same objectives, as did...

    c++ CSI Lab 6 This program is to be written to accomplish same objectives, as did the program Except this time we modularize our program by writing functions, instead of writing the entire code in main. The program must have the following functions (names and purposes given below). Fot o tentoutefill datere nedefremfite You will have to decide as to what arguments must be passed to the functions and whether such passing must be by value or by reference or...

  • Can you help me to create this program, please? Prompt the user for the user for...

    Can you help me to create this program, please? Prompt the user for the user for a number of degrees in Fahrenheit as an int. That number should be passed to a function named ffocREFO. This function will do the necessary calculation to convert the passed temperature to degrees Celsius as a double. The function MUST have a void return type and have the following prototype: void ffccREF(double& celsius, int Faren); In your main, display both the entered temperature and...

  • Recursion program C++. Visual Studio Win 32 console application that has user loop. The Design a...

    Recursion program C++. Visual Studio Win 32 console application that has user loop. The Design a computer program a executes the program, should do the following. computer, as it 1) The computer should politely ask the user for two input integers m and n. There should be code to make sure that m <-n 2) Then there should be a recursive function, called LargestToSmallestO that is invoked to output all the values from n downto m. 3) Then there should...

  • [JAVA/chapter 7] Assignment: Write a program to process scores for a set of students. Arrays and...

    [JAVA/chapter 7] Assignment: Write a program to process scores for a set of students. Arrays and methods must be used for this program. Process: •Read the number of students in a class. Make sure that the user enters 1 or more students. •Create an array with the number of students entered by the user. •Then, read the name and the test score for each student. •Calculate the best or highest score. •Then, Calculate letter grades based on the following criteria:...

  • Lab 5 Instructions For Lab 5, you will be writing a more complex modular program that...

    Lab 5 Instructions For Lab 5, you will be writing a more complex modular program that uses at least two arrays, and has at least one loop that accesses the data in the arrays. As long as your program satisfies the requirements listed below, you are free to design and write any type of program that you care to. You are encouraged to be creative, and pick something that has meaning for you, because you'll have more fun. Feel free...

  • Creating a Calculator Program

    Design a calculator program that will add, subtract, multiply, or divide two numbers input by a user.Your program should contain the following:-The main menu of your program is to continue to prompt the user for an arithmetic choice until the user enters a sentinel value to quit the calculatorprogram.-When the user chooses an arithmetic operation (i.e. addition) the operation is to continue to be performed (i.e. prompting the user for each number, displayingthe result, prompting the user to add two...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT