0% found this document useful (0 votes)
101 views

Assignment 1

This document provides instructions for Assignment 1 in an Introduction to Computing II course. It outlines two questions to be answered as part of the assignment. The first question asks students to create a class hierarchy for people including students and employees, with common attributes like name and different attributes for each. The second question asks students to create an abstract Employee class with subclasses Professional and Nonprofessional to model different types of employees with varying salary, vacation, and health insurance attributes and calculation methods. Students are to test their class hierarchies and the assignment is due by May 29th, 2021.

Uploaded by

yasa akoo
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
101 views

Assignment 1

This document provides instructions for Assignment 1 in an Introduction to Computing II course. It outlines two questions to be answered as part of the assignment. The first question asks students to create a class hierarchy for people including students and employees, with common attributes like name and different attributes for each. The second question asks students to create an abstract Employee class with subclasses Professional and Nonprofessional to model different types of employees with varying salary, vacation, and health insurance attributes and calculation methods. Students are to test their class hierarchies and the assignment is due by May 29th, 2021.

Uploaded by

yasa akoo
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Faculté de Génie - Faculty of Engineering

ITI1121Z Introduction to Computing II –Assignment 1

Due date: May 29th, 2021 – 11:30 PM EDT

Professor: Wassim El Ahmar ([email protected])

Important note: Assignments are individual work. We will use software solutions to automate the process of
checking similarity between student submissions for further inspection by the professor. Similarity of your
submission with any public solution will also be investigated.

This assignment is composed of only two questions.

1 - A student is a person, and so is an employee. Create a class Person that has the data attributes common to both
students and employees (name, social security number, age, gender, address, and telephone number) and appropriate
method definitions. A student has a grade‐point average (GPA), major, and year of graduation. An employee has a
department, job title, and year of hire. In addition, there are hourly employees (hourly rate, hours worked, and union
dues) and salaried employees (annual salary). Define a class hierarchy and write an application class that you can use
to first store the data for an array of people and then display that information in a meaningful way.

2 - A company has two different kinds of employees: professional and nonprofessional. Generally, professional
employees have a monthly salary, whereas nonprofessional employees are paid an hourly rate. Similarly, professional
employees have a certain number of days of vacation, whereas nonprofessional employees receive vacation hours
based on the number of hours they have worked. The amount contributed for health insurance is also different for
each kind of employee. Use an abstract class Employee to store information common to all employees and to declare
methods for calculating weekly salary and computing health care contributions and vacation days earned that week.
Define subclasses Professional and Nonprofessional. Test your class hierarchy.

You might also like