The Classes Required For The Proposed Design OF The System Are As Listed Below; Case Studies Examples

Type of paper: Case Study

Topic: Workplace, Public, Employee, Employment, Salary, Return, Role, Void

Pages: 6

Words: 1650

Published: 2020/09/21

Abstraction: The act of representing essential features of a class without including the background details is termed abstraction The data types of an abstract class are known as Abstract Data Types (ADT) .Classes encapsulate all the essential properties of the objects that are to be created.
Inheritance: Inheritance is the process by which objects of one class acquire the properties of another class. The concept of this class division is that each derived class shares common characteristics with the class from which it is derived. This arrangement thus forms an hierarchy of classes where a class acquires the characteristics of the class above it.
In OOP, the concept of inheritance provides the ideal for code reusability enabling us to add additional features to a class without modifying it. The new class combines the features of the two classes.
Encapsulation: Encapsulation entails the wrapping up of data and functions or methods into a single unit called a class. The data in a class is not accessible to the outside classes, only the functions or methods wrapped in the class can access it. The functions provide the interface between the object’s data and the program, and the functions are referred to as mutator and accessor methods. This insulation of the data from the direct access by the program is called data hiding or information hiding.
Polymorphism: Polymorphism defines the ability to take more than one form. A particular operation may exhibit different behaviours in different instances of the object. The behaviour depends upon the types of data used in the operation. The process of making an operator to exhibit different behaviours in different instances is known as operator overloading.
In the paradigm of Object-oriented programming, classes and objects take prominence. A class is a prototype or blueprint that defines the methods and variables that are common to all objects of a particular type. A class is a data type itself although user-defined data type and behaves just like the built-in types of the java programming language. Being a prototype, it is thus an electronic model of a real-world object. It contains items of information that are related and the functions that are performed on the items. These items of information are also referred to as the class attributes or fields, while these functions on them or behaviors are knows as methods.
An object is a concrete instance of a class, as created from the class which is its blueprint. Objects are like real-world objects having two characteristics – state and behavior. The state of a software object is maintained in one or more variables while the behavior is maintained in one or more methods. Unlike classes that are abstract, objects occupy space in memory and have a memory address referencing it.

Company
CompanyAccount
Person
Employee
CommissionEmployee
HourlyEmployee
SalaryEmployee
salCommissionEmployee
Company Class: The company class is necessary since the company has three branches at different locations. An object of company created from this class will uniquely identify a particular branch and give information on its location. An instance of this class takes the branch name and location as parameters and can return same information using the getter methods in the class.
setBranch()
getLocation()
setLocation()
CompanyAccount Class: This class extends the Company class since all the branches of the company will pay its staff through this class. This class was made separate from the Company class in order to cater for slight differences in the terms and conditions of payment from one branch to the other. A branch X of the company located in a city with high cost of living might set the percentage commission on sales a little lower than branch Y located in an environment characterized by low cost of living. An instance of this class thus takes the payment indices as parameter and has methods to set and / or retrieve each of the parameters.
commissionPercentage (Double);
hourlyPay (Double);
overtimePayPerHour (Double);
setBaseSalary()
getCommissionPercentage()
setCommissionPercentage()
getHourlyPay()
setHourlyPay()
getOvertimePayPerHour()
setOvertimePayPerHour()
Person Class: The person class caters for all types of people – customers, non-customers and employees. The attributes of the class are the firstname, lastname and sex of a person. An instance of the class takes the first name, last name and sex of a person as parameters. It has methods to retrieve and modify each of its attributes.
lname (String)
sex (String)
setFname()
getLname()
setLname()
getSex()
setSex()
Employee Class: The employee class is the base class of all categories of employees. It extends the Person class because each employee is a person and has all the attributes of a person. The Employee class has attributes Id and Role for the unique identification number of the employee and the role in the company. It has methods to set and get each attribute of the class as well as a method to get the salary for an employee object instantiated from that class. The class takes the id and role parameters in addition to the parameters of its super class – Person.
role (String)
setId()
getRole()
setRole()
CommissionEmployee Class: This class is a sub class of Employee since it also has all the attributes of the Employee super class. It has additional attributes salesVolume representing the volume of sales for an employee object of this class and commPercent representing the percentage of commission to be given on the volume of sales. It has methods to set and get each of its attributes and a method to retrieve the salary for an employee of this class.

Salary (Double)

commPercent (Double)
setSalesVolume()
getCommPercent()
setCommPercent()
HourlyEmployee Class: This class is also a sub class of Employee. Alongside the attributes of its super class Employee, it has attributes hours representing the hours worked, payPerHour representing the amount to be earned per hour of work, overtimePay representing the pay per hour of work hours after the first 40 hours of work and salary representing the total amount to be earned by an employee in this category. The extra attributes conform to the characteristics of this category of employee. The class has methods to set and also to get each attribute as well as a method to retrieve the salary for an employee object instantiated from this class.
payPerHour (Double)
overtimePay (Double)
salary (Double)
setHours()
getPayPerHour()
setPayPerHour()
getOvertimePay()
setOvertimePay()
getSalary()
SalaryEmployee Class: This class also extends the superclass Employee and has additional attribute salary. Since this category of employee takes only a base salary, the only other attribute is salary. It has methods to get and set the salary of an employee in this category.
getSalary()
salCommissionEmployee Class: Another sub class of the Employee class. It has additional attributes corresponding to the characteristics of an employee object in this category. The attributes are salesVolume representing the volume of sales of the employee, bonus representing the percent bonus given on the base salary, commPercent representing the percentage commission on sales and salary representing the total salary to be paid to an employee in this category. Each of the attributes has methods to get and set it as well as a method to retrieve the total salary.

Bonus (Double)

commPercent (Double)
salary (Double)
setSalesVolume()
getBonus()
setBonus()
getCommPercent()
setCommPercent()
getSalary()
b) The importance of involving clients in the process of decision making in the design of a software product cannot be overemphasized (Oshiro et. al., 2003). It will not make any sense to design a software that will not meet solve the problems of the client. According to Lamssweerde (2000) badly defined problems are often the main reasons for the difficulties or outright failures of software development projects. The process of requirements elicitation will thus be more fruitful when clients are involved at the early stages of the software development.
One of the ways a client can contribute to requirements elicitation early on in the project is through graphical sketching of ideas as a visualization technique. Using graphical methods to communicate ideas to clients will help overcome the challenged owing to the inability of most clients to communicate what they really want (Palmer et. al., 1990). Asides being a strong cognitive tool to process information and aid the memory, by using this graphical method of ideas presentation clients are able to identify patterns and even evolve further ideas (Lugt, 2002; Lugt, 2005).
Another method of client involvement in software development process is through prototyping. Prototyping involves designing a sample of the software in order to elicit the system requirements and changes are gradually made at the suggestion of the client until the software system is perfect enough for delivery to the client. A possible drawback of using graphical sketches is that the client may focus more on the user interface at the expense of the functionality of the system. Most of the knowledge of the user or client has been acquired over a long period through experience and will be difficult to articulate and elicit by the developer (Kujala, 2002). Prototyping in this case becomes the most effective means to engage the client in order to elicit functional system requirements by the developer.

Sales-Commission Employee:

package employeepayroll;
public class salCommissionEmployee extends Employee{

Double salesVolume;

Double salary;
Double bonus;
Double commPercent;
public salCommissionEmployee(Double salesVolume, Double bonus, Double CommPercent, String id, String role, String fname, String lname, String sex) {
super(id, role, fname, lname, sex);
this.salesVolume = salesVolume;
this.bonus = bonus;
this.commPercent = CommPercent;
}
public Double getSalesVolume() {
return salesVolume;
}
public void setSalesVolume(Double salesVolume) {
this.salesVolume = salesVolume;
}
public Double getBonus() {
return bonus;
}
public void setBonus(Double bonus) {
this.bonus = bonus;
}
public Double getCommPercent() {
return commPercent;
}
public void setCommPercent(Double commPercent) {
this.commPercent = commPercent;
}
public Double getSalary()
{
Double temp = this.salary * bonus;
salary = temp + (salesVolume * commPercent);
return salary;
}
}

Hourly Employee

package employeepayroll;
public class HourlyEmployee extends Employee{
int hours;

Double salary;

Double payPerHour;
Double overtimePay;
public HourlyEmployee(int hours, Double payPerHour, Double overtimePay, String id, String role, String fname, String lname, String sex) {
super(id, role, fname, lname, sex);
this.hours = hours;
this.payPerHour = payPerHour;
this.overtimePay = overtimePay;
}
public int getHours() {
return hours;
}
public void setHours(int hours) {
this.hours = hours;
}
public Double getPayPerHour() {
return payPerHour;
}
public void setPayPerHour(Double payPerHour) {
this.payPerHour = payPerHour;
}
public Double getOvertimePay() {
return overtimePay;
}
public void setOvertimePay(Double overtimePay) {
this.overtimePay = overtimePay;
}
public Double getSalary()
{
if(this.hours > 40)
{
int extra = this.hours - 40;
salary = (40 * this.payPerHour) + (extra * this.overtimePay);
}
else
{
salary = (this.hours * payPerHour);
}
return salary;
}
}

Commission Employee

package employeepayroll;
public class CommissionEmployee extends Employee{

Double salesVolume;

Double salary;
Double commPercent;
public CommissionEmployee(Double salesVolume, Double commPercent, String id, String role, String fname, String lname, String sex) {
super(id, role, fname, lname, sex);
this.salesVolume = salesVolume;
this.commPercent = commPercent;
}
public Double getSalesVolume() {
return salesVolume;
}
public void setSalesVolume(Double salesVolume) {
this.salesVolume = salesVolume;
}
public Double getCommPercent() {
return commPercent;
}
public void setCommPercent(Double commPercent) {
this.commPercent = commPercent;
}
public Double getSalary()
{
return salary * commPercent;
}
}

Salary Employee:

package employeepayroll;
public class SalaryEmployee extends Employee{

Double salary;

public SalaryEmployee(Double salary, String id, String role, String fname, String lname, String sex) {
super(id, role, fname, lname, sex);
this.salary = salary;
}
public Double getSalary() {
return salary;
}
public void setSalary(Double salary) {
this.salary = salary;
}
}

Person Class:

public class Person {

String fname;

String lname;
String sex;
public Person(String fname, String lname, String sex) {
this.fname = fname;
this.lname = lname;
this.sex = sex;
}
public String getFname() {
return fname;
}
public void setFname(String fname) {
this.fname = fname;
}
public String getLname() {
return lname;
}
public void setLname(String lname) {
this.lname = lname;
}
public String getSex() {
return sex;
}
public void setSex(String sex) {
this.sex = sex;
}
}

Employee Class:

public class Employee extends Person{

String id;

String role;
public Employee(String id, String category, String fname, String lname, String sex) {
super(fname, lname, sex);
this.id = id;
this.role = category;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getRole() {
return role;
}
public void setRole(String role) {
this.role = role;
}
}

Company Account:

public class CompanyAccount extends Company{

Double baseSalary;

Double commissionPercentage;
Double hourlyPay;
Double overtimePayPerHour;
public CompanyAccount(Double baseSalary, Double commissionPercentage, Double hourlyPay, Double overtimePayPerHour, String branch, String location) {
super(branch, location);
this.baseSalary = baseSalary;
this.commissionPercentage = commissionPercentage;
this.hourlyPay = hourlyPay;
this.overtimePayPerHour = overtimePayPerHour;
}
public Double getBaseSalary() {
return baseSalary;
}
public void setBaseSalary(Double baseSalary) {
this.baseSalary = baseSalary;
}
public Double getCommissionPercentage() {
return commissionPercentage;
}
public void setCommissionPercentage(Double commissionPercentage) {
this.commissionPercentage = commissionPercentage;
}
public Double getHourlyPay() {
return hourlyPay;
}
public void setHourlyPay(Double hourlyPay) {
this.hourlyPay = hourlyPay;
}
public Double getOvertimePayPerHour() {
return overtimePayPerHour;
}
public void setOvertimePayPerHour(Double overtimePayPerHour) {
this.overtimePayPerHour = overtimePayPerHour;
}
}
User Interface Screenshot

REFERENCES

Kujala, S.: User Studies: A Practical Approach to User Involvement for gathering User Needs and Requirements, Finnish Academy of Technology, 2002.
Lamssweerde, A.v.: Requirements Engineering in the Year 00: A Research Perspective. Paper presented at the Software engineering, New York, 2000; pp. 5 – 9.
Lugt, R.v.d.: Functions of Sketching in design idea generation meetings. Paper presented at the creativity & cognition, New York, 2002; pp. 72 – 79.
Lugt. R.v.d.: How sketching can affect the idea generation process in design group meetings, In: Design Studies Vol. 26 (2005) No. 2, 2005: pp. 101 – 122.
Oshiro, K; Watahiki, K; Saeki, M.: Goal-oriented Idea Generation method for Requirements Elicitation. Paper presented at the IEEE International Conference on Requirements Engineering Washington, 2003; pp. 363
Palmer, J.D.; Liang, Y.; Wang, L.: Classification as an Approach to Requirements Analysis. Paper presented at the 1st ASIS SIG/CR Classification Research Workshop, 1990; pp 131 - 138

Cite this page
Choose cite format:
  • APA
  • MLA
  • Harvard
  • Vancouver
  • Chicago
  • ASA
  • IEEE
  • AMA
WePapers. (2020, September, 21) The Classes Required For The Proposed Design OF The System Are As Listed Below; Case Studies Examples. Retrieved October 31, 2020, from https://www.wepapers.com/samples/the-classes-required-for-the-proposed-design-of-the-system-are-as-listed-below-case-studies-examples/
"The Classes Required For The Proposed Design OF The System Are As Listed Below; Case Studies Examples." WePapers, 21 Sep. 2020, https://www.wepapers.com/samples/the-classes-required-for-the-proposed-design-of-the-system-are-as-listed-below-case-studies-examples/. Accessed 31 October 2020.
WePapers. 2020. The Classes Required For The Proposed Design OF The System Are As Listed Below; Case Studies Examples., viewed October 31 2020, <https://www.wepapers.com/samples/the-classes-required-for-the-proposed-design-of-the-system-are-as-listed-below-case-studies-examples/>
WePapers. The Classes Required For The Proposed Design OF The System Are As Listed Below; Case Studies Examples. [Internet]. September 2020. [Accessed October 31, 2020]. Available from: https://www.wepapers.com/samples/the-classes-required-for-the-proposed-design-of-the-system-are-as-listed-below-case-studies-examples/
"The Classes Required For The Proposed Design OF The System Are As Listed Below; Case Studies Examples." WePapers, Sep 21, 2020. Accessed October 31, 2020. https://www.wepapers.com/samples/the-classes-required-for-the-proposed-design-of-the-system-are-as-listed-below-case-studies-examples/
WePapers. 2020. "The Classes Required For The Proposed Design OF The System Are As Listed Below; Case Studies Examples." Free Essay Examples - WePapers.com. Retrieved October 31, 2020. (https://www.wepapers.com/samples/the-classes-required-for-the-proposed-design-of-the-system-are-as-listed-below-case-studies-examples/).
"The Classes Required For The Proposed Design OF The System Are As Listed Below; Case Studies Examples," Free Essay Examples - WePapers.com, 21-Sep-2020. [Online]. Available: https://www.wepapers.com/samples/the-classes-required-for-the-proposed-design-of-the-system-are-as-listed-below-case-studies-examples/. [Accessed: 31-Oct-2020].
The Classes Required For The Proposed Design OF The System Are As Listed Below; Case Studies Examples. Free Essay Examples - WePapers.com. https://www.wepapers.com/samples/the-classes-required-for-the-proposed-design-of-the-system-are-as-listed-below-case-studies-examples/. Published Sep 21, 2020. Accessed October 31, 2020.
Copy

Share with friends using:

Please remember that this paper is open-access and other students can use it too.

If you need an original paper created exclusively for you, hire one of our brilliant writers!

GET UNIQUE PAPER
Contact us
Chat now