Skip to content

Latest commit

 

History

History
142 lines (97 loc) · 5.96 KB

README.md

File metadata and controls

142 lines (97 loc) · 5.96 KB

Module 12 Object-Oriented Programming: Team Profile Generator

Your Task

Your task is to take the given starter code and convert it into a working Node.js command-line application. This application will take in information about employees on a software engineering team, then generates an HTML webpage that displays summaries for each person. You have been provided with tests, so make sure every part of your code passes each provided test.

User Story

As a manager a user want to generate a webpage that displays my team's basic info so that a user have quick access to their emails and GitHub profiles.

Instructions

  • Create a command-line application that accepts accepts user input using the provided starter code.
    • Create classes for each team member provided and export them. The tests for these classes (in the _tests_ directory) must ALL pass.
      • The first class is an Employee parent class with the following properties and methods:
        • name
        • id
        • email
        • getName()
        • getId()
        • getEmail()
        • getRole()—returns 'Employee'
      • The other three classes will extend Employee.
      • In addition to Employee's properties and methods, Manager will also have the following:
        • officeNumber
        • getRole()—overridden to return 'Manager'
      • In addition to Employee's properties and methods, Engineer will also have the following:
        • github—GitHub username
        • getGithub()
        • getRole()—overridden to return 'Engineer'
      • In addition to Employee's properties and methods, Intern will also have the following:
        • school
        • getSchool()
        • getRole()—overridden to return 'Intern'
      • Finally, although it’s not a requirement, consider adding validation to ensure that user input is in the proper format.
    • Write code in index.js that uses inquirer to gather information about the development team members and creates objects for each team member using the correct classes as blueprints.
      • When a user starts the application then they are prompted to enter the team manager’s:
        • Name
        • Employee ID
        • Email address
        • Office number
      • When a user enters those requirements then the user is presented with a menu with the option to:
        • Add an engineer
        • Add an intern
        • Finish building the team
      • When a user selects the engineer option then a user is prompted to enter the following and then the user is taken back to the menu:
        • Engineer's Name
        • ID
        • Email
        • GitHub username
      • When a user selects the intern option then a user is prompted to enter the following and then the user is taken back to the menu:
        • Intern’s name
        • ID
        • Email
        • School
      • When a user decides to finish building their team then they exit the application, and the HTML is generated.
    • Call the render function (provided for you) and pass in an array containing all employee objects;
      • The render function will generate and return a block of HTML including templated divs for each employee!
    • Create an HTML file using the HTML returned from the render function.
      • Write it to a file named team.html in the output folder.
      • You can use the provided variable outputPath to target this location.

Mock-Up

The following image shows a mock-up of the generated HTML’s appearance and functionality:

HTML webpage titled “My Team” features five boxes listing employee names, titles, and other key info.

The styling in the image is just an example, so feel free to add your own.


Getting Started

This Challenge will combine many of the skills we've covered so far. In addition to the User Story and Acceptance Criteria, we’ve provided some guidelines to help get started.

Your application should use Jest for running the unit tests and Inquirer for collecting input from the user. The application will be invoked by using the following command:

node index.js

Hints

  • You will want to make your methods as pure as possible. This means try to make your methods simple so that they are easier to test.

  • The different employee types should all inherit some methods and properties from a base class of Employee.

  • Be sure to test out each class and verify it generates an object with the correct structure and methods. This structure will be crucial in order for the provided render function to work!

  • You may need to check if the output folder exists and create it if it does not.


Grading Requirements

This Challenge is graded based on the following criteria:

Deliverables: 25%

  • A sample HTML file generated using the application must be submitted.

  • Your GitHub repository containing your application code.

Technical Acceptance Criteria: 50%

  • Satisfies all of the preceding acceptance criteria plus the following:

    • Uses the Inquirer package.

    • All tests pass using the Jest package.

    • The application must have Employee, Manager, Engineer, and Intern classes.

Repository Quality: 25%

  • Repository has a unique name.

  • Repository follows best practices for file structure and naming conventions.

  • Repository follows best practices for class/id naming conventions, indentation, quality comments, etc.

  • Repository contains multiple descriptive commit messages.

  • Repository contains a high-quality readme with description.


Review

You are required to submit the following for review:

  • A sample HTML file generated using your application.

  • The URL of the GitHub repository, with a unique name and a readme describing the project.


© 2023 edX Boot Camps LLC. Confidential and Proprietary. All Rights Reserved.