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

11 Task Performance in Integrative Programming

Information management and data base
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
67 views

11 Task Performance in Integrative Programming

Information management and data base
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Frenz Vincent Luiz R, Abototo

BSIT 2-2 2ND term

June 7, 2024

11 Task Performance in Integrative Programming

(Code overview)
(Output)

(Code for application in next page)


using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Linq;

using System.Text;

using System.Threading.Tasks;

using System.Windows.Forms;

using EmployeeInterface;

namespace EmployeeApplication

public partial class frmComputeSalary : Form

public frmComputeSalary()

InitializeComponent();

private void frmComputeSalary_Load(object sender, EventArgs e)

public class PartTimeEployee : IEmployee

private string first_name;

private string last_name;


private string department;

private string job_title;

private double basic_salary;

public string FirstName

get

return first_name;

set

first_name = value;

public string LastName

get

return last_name;

set

last_name = value;

public string Department

get
{

return department;

set

department = value;

public string JobTitle

get

return job_title;

set

job_title = value;

public double BasicSalary

get

return basic_salary;

set

basic_salary = value;

}
}

public PartTimeEployee(string FName, string LName, string dept, string job)

this.first_name = FName;

this.last_name = LName;

this.department = dept;

this.job_title = job;

public void computeSalary(int hoursWorked, double ratePerhour)

this.basic_salary = hoursWorked * ratePerhour;

public double getSalary()

return this.basic_salary;

private void computeBTN_Click(object sender, EventArgs e)

string firstname = fnameTB.Text;

string lastname = lnameTB.Text;

string department = departTB.Text;

string jobtitle = jobtTP.Text;

double rate = Convert.ToDouble(ratephTB.Text);

int totalhw1 = Convert.ToInt32(totalhwTB.Text);

PartTimeEployee partime = new PartTimeEployee(firstname, lastname, department, jobtitle);


partime.computeSalary(totalhw1, rate);

basicsalaryLBL.Text = Convert.ToString(partime.getSalary());

fnameLBL.Text = partime.FirstName;

lnameLBL.Text = partime.LastName;

namespace EmployeeInterface

public interface IEmployee

string FirstName

get;

set;

string LastName {

get;

set;

string Department {

get;

set;

string JobTitle {

get;

set;

}
double BasicSalary {

get;

set;

void computeSalary(int houseWorked, double ratePerHour);

You might also like