Algorithms, Part 3 of 3 Topics In-Class Project: The Box

Slides:



Advertisements
Similar presentations
CMSC 104, Version 9/011 Arithmetic Operators Topics Arithmetic Operators Operator Precedence Evaluating Arithmetic Expressions In-class Project Incremental.
Advertisements

Subject: Information Technology Grade: 10
Chapter 1 Pseudocode & Flowcharts
Chapter 2- Visual Basic Schneider
Program Flow Charting How to tackle the beginning stage a program design.
Computer Science 1620 Programming & Problem Solving.
Algorithms. Software Development Method 1.Specify the problem requirements 2.Analyze the problem 3.Design the algorithm to solve the problem 4.Implement.
Lecture Notes 8/30/05 Program Design & Intro to Algorithms.
BBS Yapısal Programlama (Structured Programming)1 From problem to program In “real world”… Problem in Natural language Top Down Design in pseudo-code.
Chapter 3 Planning Your Solution
Algorithms IV: Top-Down Design
Chapter 1 Pseudocode & Flowcharts
The Project AH Computing. Functional Requirements  What the product must do!  Examples attractive welcome screen all options available as clickable.
Adapted from slides by Marie desJardins
1 L07SoftwareDevelopmentMethod.pptCMSC 104, Version 8/06 Software Development Method Topics l Software Development Life Cycle Reading l Section 1.4 – 1.5.
CMSC 104, Version 9/01 1 The Box Problem: Write an interactive program to compute and display the volume and surface area of a box. The program must also.
Section 2.3 Graphs of Linear Equations in Two Variables.
ISAT 252 Introduction to Arrays. Should have read 2 Chapter 8 –pp , and pp
Pseudocode algorithms using sequence, selection and repetition
Algorithmic Problem Solving CMSC 201 Adapted from slides by Marie desJardins (Spring 2015 Prof Chang version)
Chapter 2: Beginning the Problem-Solving Process
Mastering Char to ASCII AND DOING MORE RELATED STRING MANIPULATION Why VB.Net ?  The Language resembles Pseudocode - good for teaching and learning fundamentals.
CSEB114: Principle of programming
CMSC 104, Section 301, Fall Lecture 06, 9/18/02 Algorithms, Part 3 of 3 Topics Disk Quota Exceeded. Using Pine. More Algorithms Reading Read.
Arithmetic Operators Topics Arithmetic Operators Operator Precedence
C++ Programming Language Lecture 2 Problem Analysis and Solution Representation By Ghada Al-Mashaqbeh The Hashemite University Computer Engineering Department.
Chapter 1 Introduction Chapter 1 Introduction 1 st Semester 2015 CSC 1101 Computer Programming-1.
Coding Design Tools Rachel Gauci. What are Coding Design Tools? IPO charts (Input Process Output) Input- Make a list of what data is required (this generally.
Previously Repetition Structures While, Do-While, For.
Java course. Assignment #2, due: Feb. 27, (20) (a) Tell the difference between the abstract class and the interface. (b) Tell the difference between.
Writing JavaScript Functions. Goals By the end of this unit, you should understand … How to breakdown applications into individual, re-usable modules.
Pseudocode Algorithms Using Sequence, Selection, and Repetition
Pseudocode Algorithms Using Sequence, Selection, and Repetition Simple Program Design Third Edition A Step-by-Step Approach 6.
Variables. Todays Lesson  In todays lesson you are going to:  Learn to use variables  Learn to ask for user input  Learn to save the users response.
Chapter 1 Pseudocode & Flowcharts
CS161 Topic #16 1 Today in CS161 Lecture #16 Prepare for the Final Reviewing all Topics this term Variables If Statements Loops (do while, while, for)
Developing an Algorithm. Simple Program Design, Fourth Edition Chapter 3 2 Objectives In this chapter you will be able to: Introduce methods of analyzing.
CSCI-100 Introduction to Computing
The IF-statements 31-Jan-2005 Venkatesh Ramamoorthy.
ITI 1120 Lab #5 Contributors: S. Boyd, R. Plesa, A. Felty, D. Inkpen, A. Williams, D. Amyot.
CMSC 104, Version 9/01 1 Functions, Part 3 of 3 Topics: Coding Practice o In-Class Project: The Box o In-Class Project: Drawing a Rectangle Reading: None.
1 Algorithms Practice Topics In-Class Project: Tip Calculator In-Class Project: Drawing a Rectangle.
CMSC 104, Version 8/061L10ArithmeticOps.ppt Arithmetic Operators Topics Arithmetic Operators Operator Precedence Evaluating Arithmetic Expressions In-class.
The Hashemite University Computer Engineering Department
Intro to Loops 1.General Knowledge 2.Two Types of Loops 3.The WHILE loop 1.
Chapter 2- Visual Basic Schneider1 Chapter 2 Problem Solving.
INTRODUCTION TO COMPUTER PROGRAMMING(IT-303) Basics.
Magic 8 ball. "Design and write a python program that emulates a Magic Eight Ball. Your program should continually prompt the user to enter a question.
An Introduction to Programming with C++1 Beginning the Problem- Solving Process Tutorial 2.
Flow Charts And Pseudo Codes Grade 12. An algorithm is a complete step-by- step procedure for solving a problem or accomplishing a task.
2008/09/22: Lecture 6 CMSC 104, Section 0101 John Y. Park
Algorithms and Flowcharts
Selection Structures (Part 1)
Chapter 1 Pseudocode & Flowcharts
2008/11/12: Lab 5/Lecture 17 CMSC 104, Section 0101 John Y. Park
Pseudocode algorithms using sequence, selection and repetition
The while Looping Structure
Chapter 1 Pseudocode & Flowcharts
Chapter 2- Visual Basic Schneider
Algorithms, Part 3 of 3 Topics In-Class Project: The Box
Solutions to In-Class Problems
Algorithms Practice Topics In-Class Project: Tip Calculator
Functions, Part 4 of 4 Topics: Coding Practice Reading: None
Programming Concepts and Database
Functions, Part 3 of 3 Topics: Coding Practice Reading: None
UMBC CMSC 104 – Section 01, Fall 2016
The while Looping Structure
Chapter 1 Pseudocode & Flowcharts
Algorithms, Part 3 of 3 Topics In-Class Project: Tip Calculator
Functions, Part 3 of 4 Topics: Coding Practice Reading: None
Presentation transcript:

Algorithms, Part 3 of 3 Topics In-Class Project: The Box In-Class Project: Drawing a Rectangle Reading None CMSC 104, Version 8/06

Writing Algorithms from Scratch Given a problem statement, we are going to write the corresponding generic algorithm for the solution. We will use the following procedure: Determine the algorithm inputs and outputs Pseudocode a rough algorithm Determine the correct calculations needed. Complete the pseudocode Verify the pseudocode produces the correct results. CMSC 104, Version 8/06

The Box Problem: Write an interactive program to compute and display the volume and surface area of a box. The program must also display the box dimensions. Error checking should be done to be sure that all box dimensions are greater than zero. CMSC 104, Version 8/06

Drawing a Rectangle Problem: Write an interactive program that will draw a solid rectangle of asterisks (*). The program must also display the dimensions of the rectangle. Error checking must be done to be sure that the dimensions are greater than zero. CMSC 104, Version 8/06

Calculate Average Daily Sales Problem: Write an interactive program that will get the daily sales total for each day of the month, adding them together, and calculate the average daily sales. Error checking must be done to ensure that no negative numbers are entered by the user. CMSC 104, Version 8/06

Calculate Miles Per Gallon Problem: Write an interactive program that will get the miles driven and gallons of gas used. Calculate the miles per gallon and display it to the user. Error checking must be done to ensure that both values are greater than zero. CMSC 104, Version 8/06

Calculate Semester GPA Problem: Write an interactive program that will ask the user for the number of courses taken this semester and then get the grades for those course, using A=4, B=3, C=2, D=1, and F=0. Calculate and display the GPA to the user. Error checking must be done to ensure that no negative numbers are entered by the user. CMSC 104, Version 8/06