طلب عاجل ومستعجل جداً
هل من مغيث
سؤال هام جداً بالنسبة لي لم أستطع حله
إذا ممكن حد يحل السؤال
وله جزيل الشكر
أرجوكم ياشباب بأسرع وقت ممكن
السؤال هو
Task 1:
A paycheck: Write a class declaration for a paycheck.
Include the following attributes (Members):
· check # (String of 8 digits).
· ID number of employee receiving the check (string of 6 digits).
· Date of check. (Create an object of type Date).
· Net pay (amount of pay before deductions).
· Tax amount.
· Total allowances.
· Gross pay (amount of pay after deduction).
The member functions of this class should include:
· A constructor.
· Set and Get functions.
· A function to compute the gross pay.
· A function to print out the check.
Task 2:
Write a main function to test the above class. Create an array of at least 10 checks and fill it using set function.
Your program also should include sort and search function.
Sort: should sort the array in ascending order according to the check#.
Search: should pass the check# as an argument and search for it an array and print out the check if it is found.