Koofers

Lecture Notes for CS A201 - Programming Concepts I with Mock at University of Alaska - Anchorage (UAA)

Notes Information

Material Type:Note 1
Professor:Mock
Class:CS A201 - Programming Concepts I
Subject:Computer Science
University:University of Alaska - Anchorage
Term:Fall 2008
Keywords:
  • Environment
  • The Environment
  • Total Number
  • Description
  • Solve Problem
  • Short Answer
  • Programming
Login / Sign Up to View Document
Preview Page 1Preview Page 2Preview Page 3

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
155, "/var/app/current/tmp/"