Question

In: Computer Science

create class diagram of the following case. Case: Once a month, the person in charge of...

create class diagram of the following case.

Case: Once a month, the person in charge of the human resources area of ​​the organization prepares
the payroll to be paid. Once the calculation is made, the manager accesses and authorizes the payment of the
information generated for payment, which is updated in the database to be sent to the
Bank.
The person in charge of the payroll, in turn, is in charge of making the entry and / or withdrawal of the
collaborators of the organization.
Employees can access the intranet to consult the remuneration they will receive.
Regarding the system, it is required to develop the modeling of objects and interfaces with the use
of object structures and their relationships for an organization that has as collaborators
to the following categories:
- Administrative
- Sellers
- Production workers
Administrative staff have a fixed monthly salary
Production workers must work three different shifts: Morning, Afternoon, and Night
and eventually accrue for overtime. Depending on the shift in which they work, the salary varies.
Sellers earn a base salary plus sales commissions. Has a zone assigned
or region in which you are responsible for the distribution of the company's products.
The minimum attributes to consider are: ID, names, surnames, date of birth, level
educational.

Solutions

Expert Solution

I believe you are learning OOPS concepts , that is pretty good.AS OOPS designing is one of the most sought afters kills in the industry.

Its nice that you are designing the classes,as it will help you become better software developer.

My industrial experience says, before designing the classes you check the relationships between the classes.

SO here as we can check, Employees are of three types ,Shifts are of three types.

NOTE : ITS a golden rules i am telling you, always prefer interfaces over classes, that means, Implementing interface is better than extending classes.

So first create an interface Employee

interface Employee {

private ID,

  Name,

  surname,

  DOB,

  Education

void Salary();

}

// here salary is made abstract as different employees have different salary structure

make next interface SHIFTS

interface Shifts {

void remenuration ();

}

// various shifts will have different payouts

Now make some classes,

Class Adminitrative_Worker implement Employee {

// initialise all the attributes here name, DOB etc.

void salary () {

// overridden function

return fixed salary;

}

}

class Sellers implement Employee {   

float commssion

Seller(comission) {

// each seller will have different commission thus , intialize it in the parametrized constructor

}

void salary () {

// here you add fixed salary + sales commission

}

}

class Production_Workers implement Shifts, Employee {

string shift;

Production_worker(shift){

//each worker will have different shift intitliase it here

}

void remenuration(){

if day return day_payout

else if evening return evening_payout

else return night_payout

}

void Salary(){

return fixed + remuneration()

}

}

NOTE : here each class has been identified with respect to constarints provided above , there can be many designs to follow up, but this one is good enough to work even on LIVE Project.

also, i would suggest you to go through, design pattern in OOPS concepts, it help you a lot.

HOPE YOU LIKED IT.

HAPPY LEARNING !


Related Solutions

// File name: Person.h // Person class declaration. Person is the base class. #pragma once #include...
// File name: Person.h // Person class declaration. Person is the base class. #pragma once #include <iostream> using namespace std; class Person { private:         string fName;         string lName;         int birthYear;         int birthMonth;         int birthDay; public:         Person();         void setName(string, string);         void setBirthDate(int, int, int);         string getFullName();         string getBirthDate(); }; // File name: Person.cpp // Person class definition. Person is the base class. #include "Person.h" Person::Person() { fName = ""; lName =...
Create a use case diagram for the following system. Attach a WORD file with the diagram....
Create a use case diagram for the following system. Attach a WORD file with the diagram. UVA Chatbot Chatbot is a computer program powered by AI that allows business to interact with the customers via a chat interface. Assume you are working on a project to develop a Chabot that will provide student services for ODU. The Chabot you are working on has the following functions: Gathering Information When a student initiates a conversation, there are some formalities to go...
You are to create a class called Person. You should create the definition of the class...
You are to create a class called Person. You should create the definition of the class Person in a file person.h and the functions for Person in person.cpp. You will also create a main program to be housed in personmain.cpp. A Person will have attributes of Height (in inches) Weight (in pounds to 2 decimal places) Name (string) Gender (‘m’ or ‘f’) Ethnicity/Race (could be more than one word) Occupation (also more than a single word) A Person will have...
Create a simple Java class for a Month object with the following requirements:  This program...
Create a simple Java class for a Month object with the following requirements:  This program will have a header block comment with your name, the course and section, as well as a brief description of what the class does.  All methods will have comments concerning their purpose, their inputs, and their outputs  One integer property: monthNumber (protected to only allow values 1-12). This is a numeric representation of the month (e.g. 1 represents January, 2 represents February,...
C++ * Program 2:      Create a date class and Person Class.   Compose the date class...
C++ * Program 2:      Create a date class and Person Class.   Compose the date class in the person class.    First, Create a date class.    Which has integer month, day and year    Each with getters and setters. Be sure that you validate the getter function inputs:     2 digit months - validate 1-12 for month     2 digit day - 1-3? max for day - be sure the min-max number of days is validate for specific month...
Create CRC card, class diagram and an object diagram for the school students' healthcare system that...
Create CRC card, class diagram and an object diagram for the school students' healthcare system that may have the entities represent a system for a student_patient billing system. Include only the attributes that would be appropriate for this context. Student_Patient (age, name, hobbies, blood type, occupation, insurance carrier, address, phone) Student_Insurance carrier (name, number of patients on plan, address, contact name, phone) University_Doctor (specialty, provider identification number, golf handicap, age, phone, name)
Create HiArrayPerson class to store objects of type class Person (in java ) and Give example
Create HiArrayPerson class to store objects of type class Person (in java ) and Give example
Elevator (C++) Following the diagram shown below, create the class Elevator. An Elevator represents a moveable...
Elevator (C++) Following the diagram shown below, create the class Elevator. An Elevator represents a moveable carriage that lifts passengers between floors. As an elevator operates, its sequence of operations are to open its doors, let off passengers, accept new passengers, handle a floor request, close its doors and move to another floor where this sequence repeats over and over while there are people onboard. A sample driver for this class is shown below. Each elevator request translates into just...
Draw the Use Case Diagram for the case You have to create a Community Library Borrowing...
Draw the Use Case Diagram for the case You have to create a Community Library Borrowing System based on the following requirements: When new books arrive, these books must be cataloged into the system by a librarian (i.e., entered in the system). The system also needs to record who has borrowed what books. When someone (called a patron in library terms) borrows a book, the system checks his or her library card to ensure that it is still valid and...
Please read the following scenario and then create the deliverable listed below, 1) Use case diagram...
Please read the following scenario and then create the deliverable listed below, 1) Use case diagram 2) Interaction diagram 3) Create the core and supporting classes of the RIM (Entity, Role, Role Relationship, Participation, Act, Act Relationship) similar to the one in slide 20 in the live session Note: Copy the MS VISIO diagrams and paste them onto a word document and then submit only one word file to the assignment submission link. Scenario Mrs. Annie Nuclear showed symptoms such...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT