Javascript

This week’s exercise is to design a program for node.js that calculates paychecks for a small business. The program must read the two files “wages.csv” and “hours.csv” which are 2 column CSV files, an employee name and a number. In the case of “wages.csv” the number represents the hourly wage. In the case of “hours.csv” the number represents the number of hours worked in the last pay period. Some names in “wages.csv” may not be present in “hours.csv” (in case the employee has not worked). The program must produce the file “report.txt” with a line for each employee indicating the amount of the paycheck of this employee. Here are examples of “wages.csv”, “hours.csv” and “rapport.txt” files:

“wages.csv” file

Jean Dubuc, 25
Anne Gadbois, 20
Julie Tremblay, 40
Paul Tremblay, 20
Marie Valois, 15

“hours.csv” file

Jean Dubuc, 70
Julie Tremblay, 60
Marie Valois, 80

File “rapport.txt”

Jean Dubuc: pay $ 1,750
Anne Gadbois: pay $ 0
Julie Tremblay: pay $ 2,400
Paul Tremblay: pay $ 0
Marie Valois: pay $ 1,200
Your program must use the read CSV function seen in class. Note that the program should start with a comment that gives your name, followed by the following definitions for the readFile and writeFile functions, needed in the node.js environment:

var fs = require (“fs”);
var assert = require (“assert”);

var readFile = function (path) {
    return fs.readFileSync (path) .toString ();
};
var writeFile = function (path, text) {
    fs.writeFileSync (path, text);
};
Write a testCheques unit test function that tests your functions. As usual, in addition to doing the requested processing correctly, your code must be correctly indented, it must contain explanatory comments and significant identifiers.

I suggest you use emacs to develop your code.

#write essay #research paper #blog writing #article writing #academic writer #reflective paper #essay pro #types of essays #write my essay #reflective essay #paper writer #essay writing service #essay writer free #essay helper #write my paper #assignment writer #write my essay for me #write an essay for me #uk essay #thesis writer #dissertation writing services #writing a research paper #academic essay #dissertation help #easy essay #do my essay #paper writing service #buy essay #essay writing help #essay service #dissertation writing #online essay writer #write my paper for me #types of essay writing #essay writing website #write my essay for free #reflective report #type my essay #thesis writing services #write paper for me #research paper writing service #essay paper #professional essay writers #write my essay online #essay help online #write my research paper #dissertation writing help #websites that write papers for you for free #write my essay for me cheap #pay someone to write my paper #pay someone to write my research paper #Essaywriting #Academicwriting #Assignmenthelp #Nursingassignment #Nursinghomework #Psychologyassignment #Physicsassignment #Philosophyassignment #Religionassignment #History #Writing #writingtips #Students #universityassignment #onlinewriting #savvyessaywriters #onlineprowriters #assignmentcollection #excelsiorwriters #writinghub #study #exclusivewritings #myassignmentgeek #expertwriters #art #transcription #grammer #college #highschool #StudentsHelpingStudents #studentshirt #StudentShoe #StudentShoes #studentshoponline #studentshopping #studentshouse #StudentShoutout #studentshowcase2017 #StudentsHub #studentsieuczy #StudentsIn #studentsinberlin #studentsinbusiness #StudentsInDubai #studentsininternational