Create your own Subprogram that does *not* use any input parameters
Answer the following questions:
Create your own Subprogram that does *not* use any input parameters. You decide the theme. You should provide the pseudocode and an example Subroutine call. Be sure to provide an overview of what your subprogram is doing.
Create your own Subprogram that uses at least one input parameter and a return parameter. You decide the theme. You should provide the pseudocode and an example Subroutine call. Be sure to provide an overview of what your subprogram is doing.
In your own words, explain the difference between passing parameters by value and passing parameters by reference. Differentiate, through a pseudocode example, passing by value and passing by reference. Be sure to provide an overview of what your subprograms are doing and what makes them different.
In this assignment, you will design a program to perform the following task:
Write a program using functions that asks the user for the dimensions (Length and Width) of a rectangle and calculates:
a) The area and perimeter of the rectangle
b) The length of the diagonal (use the Pythagorean Theorem: c2 = a2 + b2, where c = length of the diagonal; a = length; b = width)
This is a rectangle b
a
Before attempting this exercise, be sure you have completed all of chapter 7 and course module readings, participated in the weekly conferences, and thoroughly understand the examples throughout the chapter. There are 3 main components of your submission including the problem analysis, program design and documentation, and sample test data.
1. Provide your analysis for the following problem statement: Write a program that calculates the area, perimeter, and diagonal length of a rectangle whose dimensions (Length and width) are provided by the user.
Your analysis should be clearly written and demonstrate your thought process and steps used to analyze the problem. Be sure to include what is the required output? What is the necessary input and how you will obtain the required output from the given input? Also, include your variable names and definitions. Be sure to describe any necessary formulas and sample calculations.
2. Provide your program design for the problem you analyzed for calculating and displaying the area, perimeter, and diagonal (hypotenuse) length of a rectangle. Always work for modular design where possible. Be sure to use separate function for calculating the area; separate function for calculating the perimeter, and separate function for calculating the diagonal length of the rectangle. Use subprograms for Input and Output. Be sure to describe the fundamental tasks (i.e., things your program must do) needed to solve the problem so you can use a modular design. Provide pseudocode of your overall design that includes the Main module, subprograms, functions, and the order of the module calls; Hierarchy chart for the program. Finally, display the flow charts (using Raptor, or your favorite graphics editor) for each module.
Include header and step comments in your pseudocode, using a similar approach as the example provided in section 2.3 (textbook page 87). See example 2.8 on pages 87-88.
3. Prepare at least 3 sets of input data (Test data) along with the expected outputs for testing your program. Your test data can be presented in the form of a table as was shown in Assignment 1.
Submission requirements:
1. Your completed assignment should be saved as Word document and submitted to your WebTycho assignment area no later than the due date listed in the syllabus. Your document should be neat, detailed, well-written with minimal grammatical and spelling errors. Your name should be clearly listed on the first page along with the class/section, professor and due date. Your document should contain page numbers at the bottom of each page. Single or double space line formatting is acceptable. The Hierarchy Chart should be included in the Word document.
2. A separate file containing the Raptor flow chart.
You should name the file yournamehw4.docx (or yournamehw4.doc). So for my name Abrom Cooper, I would name my document abromcooperhw2.docx.
Use the attached HW4.doc template file containing the required sections. You should use this document to start your writing and fill in all of the details required.
Your final project will be to analyze, design, and document a simple program that utilizes a good design process and incorporates sequential, selection and repetitive programming statements as well functions and subprogram call and the use of array. The specific problem you need to solve for the final project is:
Design a program that will allow a user to input a list of positive numbers (terminated by 0) into an array, find the smallest and largest number in the array and the mean (average) of the numbers in the array, and output the result. use a subprogram to input the numbers, a