Skip to content

Pieros/HW1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mr.Nadtanan Praphansiri Student ID 5310613194 Mr.Peeravas Ruengsawas Student ID 5310612048

Grading:
part1: 100

#sum
  should be defined
  returns correct sum [20 points]
  works on the empty array [10 points]

#max_2_sum
  should be defined
  returns the correct sum [7 points]
  works even if 2 largest values are the same [3 points]
  returns zero if array is empty [10 points]
  returns value of the element if just one element [10 points]

#sum_to_n
  should be defined
  returns true when any two elements sum to the second argument [30 points]
  returns false for the empty array with nonzero argument [5 points]
  returns true for the empty array with zero argument [5 points]

part2: 90

#hello
  should be defined
  The hello method returns the correct string [30 points]

#starts_with_consonant?
  should be defined
  classifies true cases [10 points]
  classifies false cases [10 points]
  works on the empty string [5 points]
  works on nonletters [5 points] (FAILED - 1)

#binary_multiple_of_4?
  should be defined
  classifies valid binary numbers [25 points]
  works with 0 [5 points] (FAILED - 2)
  rejects invalid binary numbers [10 points]

part3: 100

BookInStock
  should be defined
  constructor
    should reject invalid ISBN number [10 points]
    should reject zero price [10 points]
    should reject negative price [10 points]
  getters and setters
    should set ISBN [10 points]
    should set price [10 points]
    should be able to change ISBN [10 points]
    should be able to change price [10 points]
  #price_as_string
    should be defined
    should display 33.95 as "$33.95" [10 points]
    should display 1.1 as $1.10 [10 points]
    should display 20 as $20.00 [10 points]

Total: 290
Late: 0 day
Deduction: 0
Final Score: 290/300

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages