اذهب إلى المحتوى

ليلى سمور

الأعضاء
  • المساهمات

    5
  • تاريخ الانضمام

  • تاريخ آخر زيارة

آخر الزوار

لوحة آخر الزوار معطلة ولن تظهر للأعضاء

إنجازات ليلى سمور

عضو مبتدئ

عضو مبتدئ (1/3)

1

السمعة بالموقع

  1. Suppose there are 500 students in Information Technology college at Mutah University. Every student has her/his own (ID, Name, Address, coursesGPA and college name ) ;however, they share the same college name. Write a complete Java program to implement this student class having all instance members( with proper modifier), different constroctors and methods to Add course, Drop course, Print Students_details and GPA_Calc. Your program should have a main class and a test class to invoke the main method, initialze all students objects, and invoke all others user defined methods based menu driven interface
  2. Develop a simple Payroll application for a company, there are three kinds of employees in the system: salaried employee, hourly employee, and commissioned employee. The system should take input as an array containing employee objects, calculate salary polymorphically (according to employee object), and generates report. In the SalariedEmp, salary is the salary – (salary * taxRate). In HourlyEmp, salary is (hours*hourlyRate) – (hours * hourlyRate * taxRate). In CommEmp, salary is (sales * commRate) – (sales * commRate * taxRate). Write a main() program to test the employee classes by creating array of pointer (size 3). Each pointer should be dynamically allocated to SalariedEmp, HourlyEmp and CommEmp respectively. Then, displaying the data (name and salary) using public method.
  3. Create a class called Person that stores the name (character array of size 30), gender (single character), and age (type integer). From this class derive two classes: Student, which stores a student id (type integer), faculty name (character array of size 20) and level (type integer), and Employee, which stores a company name (character array of size 20) and salary (type double). Each of these three classes should have setdata( ) method to set its data from the user, getdata( ) method to return the value of each class data member, and a display( ) method to print its data. Write a main() program to test the person, student and employee classes by creating objects of them, asking the user to fill in data with setdata( ), and then displaying the data with display ( ) method.
×
×
  • أضف...