1 / 25

CSC 111 csc111.wordpress

Solving Problems with Computers. . Java Programming: From Problem Analysis to Program Design, Third Edition. 3. Solving Problems Stages . Problem DefinitionDefine the main Problem. Java Programming: From Problem Analysis to Program Design, Third Edition. 4. Problem Definition . Write a Program to

kris
Télécharger la présentation

CSC 111 csc111.wordpress

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


    1. CSC 111 http://csc111.wordpress.com

    3. Java Programming: From Problem Analysis to Program Design, Third Edition 3 Solving Problems Stages Problem Definition Define the main Problem

    4. Java Programming: From Problem Analysis to Program Design, Third Edition 4 Problem Definition Write a Program to Print the Sum of two integer Numbers Write a program to Print the Average of three integer numbers Write a program to print the volume of a cube and the sum of its surfaces areas

    5. Java Programming: From Problem Analysis to Program Design, Third Edition 5 Solving Problems Stages Problem Definition Define the main Problem Problem Analysis Determine the inputs, outputs, Arithmetic & logic operations

    6. Java Programming: From Problem Analysis to Program Design, Third Edition 6 Problem Analysis Write a Program to Print the Sum of two integer Numbers Inputs : First Number Second Number Operations : Summation = first + second Output : The summation

    7. Java Programming: From Problem Analysis to Program Design, Third Edition 7 Problem Analysis Write a program to Print the Average of three integer numbers Inputs : First Number Second Number Third Number Operations : Average = (first + second + third ) / 3 Output : The Average

    8. Java Programming: From Problem Analysis to Program Design, Third Edition 8 Problem Analysis Write a program to print the volume of a cube and the sum of its surfaces areas Inputs : Side Length Operations : Volume = side * side * side Surface area = ( side * side ) * 6 Output : The Volume The surface area

    9. Java Programming: From Problem Analysis to Program Design, Third Edition 9 Solving Problems Stages

    10. Java Programming: From Problem Analysis to Program Design, Third Edition 10 Basic steps for designing a solution

    11. Java Programming: From Problem Analysis to Program Design, Third Edition 11 Algorithms Write a Program to Print the Sum of two integer Numbers Start the program Read the first number ( N1 ) Read the second number ( N2 ) Sum the both numbers in ( Sum ) ? Sum = N1 + N2 Print the variable ( Sum ) End the program

    12. Java Programming: From Problem Analysis to Program Design, Third Edition 12 Algorithms Write a program to Print the Average of three integer numbers Start the program Read the first number ( num1 ) Read the second number ( num2 ) Read the third number ( num3 ) Sum the three numbers in ( result ) ? result = num1 + num2 + num3

    13. Java Programming: From Problem Analysis to Program Design, Third Edition 13 Algorithms Write a program to Print the Average of three integer numbers Divide the ( result ) by 3 and save the result in ( Average ) ? Average = result / 3 Print the ( Average ) End the program

    14. Java Programming: From Problem Analysis to Program Design, Third Edition 14 Algorithms Write a program to print the volume of a cube and the sum of its surfaces areas Start the program Read the length of the side ( Length ) Volume = Length * Length * Length Surface = ( Length * Length ) * 6 Print the ( Volume ) Print the ( Surface ) End the program

    15. Java Programming: From Problem Analysis to Program Design, Third Edition 15 Organization of Instructions Instructions that describe behavior can be organized in three ways in most programming languages: Sequentially Conditionally (Selection) Repetitively

    16. Java Programming: From Problem Analysis to Program Design, Third Edition 16 Sequentially

    17. Java Programming: From Problem Analysis to Program Design, Third Edition 17 Flow Charts

    18. Java Programming: From Problem Analysis to Program Design, Third Edition 18 Flow charts Symbols

    19. Simple Sequential Flow Charts

    20. Java Programming: From Problem Analysis to Program Design, Third Edition 20 Write a Program to Print the Sum of two integer Numbers Start the program Read the first number ( N1 ) Read the second number ( N2 ) Sum the both numbers in ( Sum ) ? Sum = N1 + N2 Print the ( Sum ) End the program

    21. Java Programming: From Problem Analysis to Program Design, Third Edition 21 Write a program to print the volume of a cube and the sum of its surfaces areas Start the program Read the length of the side ( Length ) Volume = Length * Length * Length Surface = ( Length * Length ) * 6 Print the ( Volume ) Print the ( Surface ) End the program

    22. Java Programming: From Problem Analysis to Program Design, Third Edition 22 Write a program to Print the Average of three integer numbers

    23. Java Programming: From Problem Analysis to Program Design, Third Edition 23 Write a program to Print the Average of three integer numbers

    24. Java Programming: From Problem Analysis to Program Design, Third Edition 24 Write a program to Print the Average of three integer numbers

    25. Java Programming: From Problem Analysis to Program Design, Third Edition 25 Write a program to Print the Average of three integer numbers

More Related