Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1. Pseudocode and Stepwise Refinement When creating a small program, you have a few basics to work with: variables, assignment statements, and input/output routines. You
1. Pseudocode and Stepwise Refinement When creating a small program, you have a few basics to work with: variables, assignment statements, and input/output routines. You might also have some subroutines, objects, or other building blocks that have already been written by you or someone else. (Math and System routines fall into this category) You can build sequences of these basic instructions, and you can also combine them into more complex control structures such as while loops and if statements. Suppose you have a task in mind that you want the computer to perform. One way to proceed is to write a description of the task,and take that description as an outline of the algorithm you want to develop. Then you can refine and elaborate that description, gradually adding steps and detail, until you have a complete algorithm that can be translated directly into programming language. This method is called stepwise refinement, and it is a type of top-down design. As you proceed through the stages of stepwise refinement, you can write out descriptions of your algorithm in pseudocode -informal instructions that imitate the structure of programing languages without the complete detail and perfect syntax of actual program code As an example, let's see how one might develop the program that computes value of an investment Write a class that computes the amount of interest that is earned on an investment over a period of 5 years. The initial amount of the investment and the interest rate are input by the user. The value of the investment at the end of each year is output
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started