## Notes Information

Login / Sign Up to View Document

## Sample Document Text

CS201
HW#1, 40 points total
Due: Midnight, Wednesday, 9/17
Submit your programs/code via Blackboard
Algorithm Design
1. (8 points). Running. You have finished a race and would like to know at what pace
you ran the race. Describe an algorithm (i.e. an English description that illustrates
step by step how to solve the problem) that takes as input the distance of the race in
miles, and the finishing time in hours, minutes, and seconds. Your algorithm should
compute the pace per mile in minutes and seconds.
To test your algorithm, an input of 26.2 miles, 3 hours, 16 minutes, and 30 seconds
should result in a pace of 7:30 per mile.
For this part, give an algorithm only, do not write code.
Short Answer
2. (4 points) Given the algebraic equation
y = ax3 + 2x + 7
Which of the following, if any, are correct Java statements for this equation?
a. y=a*x*x*x+2*x+7;
b. y=a*x*x*x+2*(x+7);
c. y=a*(x*x*x+(2*x)+7);
d. y=(a*x)*x*x+7+x*2;
e. y=a*(x*x*x)+(2...

## Related Documents

Either...or Exam

Application Notes

© Copyright 2020 , Koofers, Inc. All rights reserved.

The information provided on this site is protected by U.S. and International copyright law, and other applicable intellectual property laws, including laws covering data access and data compilations. This information is provided exclusively for the personal and academic use of students, instructors and other university personnel. Use of this information for any commercial purpose, or by any commercial entity, is expressly prohibited. This information may not, under any circumstances, be copied, modified, reused, or incorporated into any derivative works or compilations, without the prior written approval of Koofers, Inc.