Coder Social home page Coder Social logo

hw1's Introduction

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

hw1's People

Contributors

aj-jack avatar weerachai avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.