Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

Your midterm will be a project like other homework. It carries 25% of your total grade.

Write a program to allow the user to:

1. Create two classes. Employee and Departments.
The Department class will have: DepartmentID, Departmentname, DepartmentHeadName.
The Employee class will have employeeID, emploeename, employeesalary, employeeage, employeeDepartmentID.
Both of the above classes should have appropriate constructors, accessor methods.

2. Create two arrays . One for Employee with the size 7 and another one for Department with the size 3.

Your program should display a menu for the user to do the following:

1. Create Department. Collect all information about a department. Make sure the department ID does not already exist in the array containing Department objects. If it does not, then insert the Department object into the array. When the array is full, display the error message to the user "The array is full, you can not add any more departments"

2. Create Employee. Collect all information about an Employee. Make sure the Employee ID does not already exist in the array containing Employee objects. If it does not, then insert the Employee object into the array. Also make sure that the DepartmentID that the employee belongs also exists.When the array is full, display the error message to the user "The array is full, you can not add any more Employees"

3. Write the data to the file. When the user selects this option, dump the information in each array into a separate file. Do not write to the file until the arrays are full.

4. Retrieve data from file. When user selects this option, open each file, load the data from the file into the appropriate array.

5. Display Report: When user selects this option, go through arrays and display the total salary paid for each department.

6. Put the above options in loop until the user want to exit the program.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M91736451

Have any Question?


Related Questions in Computer Engineering

Do you believe corporation pose as a risk to our national

Do you believe corporation pose as a risk to our national economy and to domestic employees based upon external shocks to our economy as well as government regulations and Obamacare?

Can someone explain to me how stooge works in the most

Can someone explain to me how Stooge works in the most simplified way. Because am having a hard time understanding it. There was an example on youtube that goes like this: if you are given a small array of numbers that w ...

Qestion what steps are involved for implementing sw s0 0

Question : What steps are involved for implementing sw $s0 , 0 ( $s1) instruction . Draw data path and control path for this instruction. The response must be typed, single spaced, must be in times new roman font (size 1 ...

A string in c is simply an array of characters with the

A string in C++ is simply an array of characters with the null character(\0) used to mark the end of the string. C++ provides a set of string handling function in as well as I/O functions in . With the addition of the ST ...

Determine the mass of the water by using the waters density

Determine the mass of the water by using the water's density (specific to the initial temperature) and the volume of the water. Remember,  density = mass/volume . You can look up the density of the water at your specific ...

A 1000 utility bond with 14 years remaining before maturity

A $1000 utility bond with 14 years remaining before maturity can now be purchased for $760. It pays interest of $20 each 6-month period. What rate of return is earned by purchasing the bond at the current market price pl ...

Can someone please show me how to do this step by step

Can someone please show me how to do this step by step please. I dont understand any of it 1.) Add a new virtual disk a) Edit VMware player settings to add a new virtual hard disk. b) Start or reboot the virtual machine ...

Question do a research on the internet and discuss about

Question : Do a research on the Internet and discuss about the history of development of the networking field. Also discuss some of the recent trends in the networking area, (approx 200 words)

A random sample ofnbsp77nbspeighth gradenbspstudents scores

A random sample of 77 eighth grade? students' scores on a national mathematics assessment test has a mean score of 285. This test result prompts a state school administrator to declare that the mean score for the? state' ...

Recently the discovery of a new data structure wonder heap

Recently, the discovery of a new data structure WONDER HEAP was announced. A WONDER HEAP has the same functionality and worst case behaviour as a binary heap except for DELETE MAX, which is implemented in O(log log n) (i ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As