Topic 10 Parameters Case Study " Thinking like a computer - - PowerPoint PPT Presentation

topic 10 parameters case study
SMART_READER_LITE
LIVE PREVIEW

Topic 10 Parameters Case Study " Thinking like a computer - - PowerPoint PPT Presentation

Topic 10 Parameters Case Study " Thinking like a computer scientist means more than being able to program a computer. It requires thinking at multiple levels of abstract." Jeannette M. Wing Based on slides for Building Java


slide-1
SLIDE 1

CS305j Introduction to Computing Parameters Case Study

1

Topic 10 Parameters Case Study

"Thinking like a computer scientist means

more than being able to program a computer. It requires thinking at multiple levels of abstract."

— Jeannette M. Wing

Based on slides for Building Java Programs by Reges/Stepp, found at http://faculty.washington.edu/stepp/book/

slide-2
SLIDE 2

CS305j Introduction to Computing Parameters Case Study

2

Case Study

8This case study involves

– structured programs – input from a user – loops – variables – expressions – methods – parameters

slide-3
SLIDE 3

CS305j Introduction to Computing Parameters Case Study

3

Problem Statement

8A triathlon is an endurance event consisting

  • f a swim, bike, and run portion.
slide-4
SLIDE 4

CS305j Introduction to Computing Parameters Case Study

4

More details

8Write a program that determines the average speed of each leg based on a number of participants.

– Swim is expressed as time per 100m – Biking is expressed in miles per hour – Running is expressed as time per mile

8Ask user for number of athletes 8User inputs swim, bike, and run distances 8User nput times for each athlete 8Show results