Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 

Repository files navigation

Class project

Objective

In this project, our main goal is to understand how to build a class and use its properties and methods by creating objects.

Problem

Build an employee class with the mentioned properties and methods below.

Implementation

  • In the Employee class:
  1. Add the properties below to the Employee class:
  • int id
  • string name
  • string role
  • double salary
  1. Create printInfo() method, that prints all Employee class properties.

  • In the main function:
  1. Create an object of the Employee class

  2. Access object properties and assign a value for each one

  3. Call printInfo() method to print object values For example, when running the program, the output should be similar to the following:

ID: 1
Name: Ahmed
Role: Software developer
Salary: 10000

#include <iostream>

using namespace std;

class Employee {

    public:
// Add your code here


};

int main(){

// Add your code here

return 0;

};

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages