RU beehive logo ITEC dept promo banner
ITEC 120
2008spring
ibarland,
jdymacek

homeinfoexamslectureslabshws
RecipeLawsliessyntaxjava.lang docsjava.util docs

pre-quiz
fake quiz

  1. We saw in lecture that the arithmetic formula
    h(t) = 102 - t
    can be translated into Java as
    int h( int t ) {
      return 102 - t;
      }
    
    Translate the arithmetic formula g(n) = 3·n + 2 into Java
    
    
    
    
    
    
    
    
    
    
  2. Without a calculator: What is 20% of of 60?                 
  3. An airline charges extra for particularly heavy suitcases: $1 extra for each pound over 40 pounds. What should a flight attendent mo answer, when asked what the surcharge is for the following weights?
    weightsurcharge
    mo.surcharge( 40 ) =                 
    mo.surcharge( 41 ) =                 
    mo.surcharge( 42 ) =                 
    mo.surcharge( 50 ) =                 
    mo.surcharge( 53 ) =                 
    surcharge( w ) =                 
    Note that the last entry is the difficult one: will be an arithmetic formula involving w. You can double check that if w is 40, your formula gives the same answer as you listed in the first row.
pre-quiz-soln.html

homeinfoexamslectureslabshws
RecipeLawsliessyntaxjava.lang docsjava.util docs


©2008, Ian Barland, Radford University
Last modified 2008.Jan.24 (Thu)
Please mail any suggestions
(incl. typos, broken links)
to iba�rlandrad�ford.edu
Powered by PLT Scheme