CS 1102 (A04) Midterm Makeup Questions

Due: October 5 (Tuesday) at 11:59pm via turnin (assignment name makeup).

Several students fell below the passing cutoff on the midterm, despite their (and often my) expectations that they would have passed. This optional assignment allows those who did poorly on the midterm to raise their midterm grade to the passing bar. Specifically: if you got below 45 on the midterm and want to try to raise your midterm grade to a 45, you may turn in the following set of problems. This will take the pressure off of you having to rely on the final to pass the course.

Some policies:

The Assignment

A company maintains several pieces of information about its employees: their name, hourly salary, the names of projects they work on (could be several, like database, web, service), and which (other) employees they supervise. A person may work on different projects than his or her boss.

  1. Develop a data definition and one example of data for company employee hierarchies with at least 4 employees. The hierarchy should start with a single person (the boss).

  2. Write a function raise-by-project that consumes a project name, number (percentage), and employee hierarchy and produces an employee hierarchy in which every person on the named project gets a raise of the given percentage.

  3. Write a function on-project that consumes the name of a project and an employee hierarchy and produces a list of names of people who work on the named project.

  4. Write a program emptree-filter that consumes an employee hierarchy and a function from employees to boolean and produces a list of employees for whom the given function returns true.

  5. Show how to rewrite on-project using emptree-filter and map.


What to Turn In

Turn in a single file makeup.ss (or makeup.scm) containing all code and documentation for this assignment.


Guidelines


Back to the Assignments page