Giter Site home page Giter Site logo

examsasync's Introduction

JavaScript Exercises: Async and Functional

My U.S. Scores

  • Develop a JS program to convert the scores of your exams into the U.S. system
  • Using the functional approach, you should manage a list of objects that includes the following information about the exams:
    • Course Code, Course Name, CFU, Score (a number between 18 and 30)
  • Create a new list with the same information but the scores according the U.S. system, where:
    • 27+ -> A, 24-26 -> B, 19-23 -> C, 18 -> D
  • Then, compute the weighted average, considering A as 4.0 and D as 1.0
  • Print all your scores (in both formats), and the computed average

A possible solution: us-scores.js

Courses and Scores, in a Database

  • Update the "Courses and Scores" exercise to use a database.
  • Manage a list of objects and related DB tables that include information about the exams:
    • Course Code, Course name, CFU
    • Attained score (number between 18 and 30, plus a Boolean for the laude)
    • Date
  • The list of Exam objects, named ExamList, will have the following methods, operating on the DB, which return Promises:
    • add(exam) // pass a fully-constructed Exam object
    • getAll() // returns (a Promise that resolves to) an ExamList with all the Exams
    • find(courseCode) // returns (a Promise that resolves to) the matching Exam
    • afterDate(date) // returns (a Promise that resolves to) an ExamList with the subset of Exams after the given date
    • getWorst(num) // returns (a Promise that resolves to) an ExamList with the num Exams with the lowest score

A possible solution: transcript-db.js

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.