Create two classes employee and departments

Assignment Help Programming Languages
Reference no: EM131564554

Assignment

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.

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.

Please make sure that when the user tries to exit the program without having saved the data, alert the user that the data has not been saved and will be lost. Proceed only if the user consents.

Reference no: EM131564554

Questions Cloud

Snapshot for the cis countries : View article Economic Snapshot for the CIS Countries by Angela Bouzanis and give explain the following:
How high will the pile be : A piece of paper 0.0040 in. thick is cut in half. These two pieces are then placed one on the other and cut in half. If this is repeated such that the paper.
What can you do to help them transition : What can you do to help them transition into a project management role?The cost was not taken into consideration in the project budget.
How does port facility technology interface : How does port facility technology interface with homeland security
Create two classes employee and departments : Create two classes. Employee and Departments. Make sure the department ID does not already exist in the array containing Department objects.
How far does object travel while stopping : After the power is turned off, an object on a nearly frictionless surface slows down such that it travels 99.9% as far during 1 s as during the previous second.
Assume that interest rate parity holds : Assume that interest rate parity holds. What is the yield on 180-day risk-free securities in the United States?
Develop organisations remuneration strategy : BSBHRM505 Manage remuneration and employee benefits - Develop organisations remuneration strategy and Conduct research on a selected superannuation fund
How creative expressions can broaden your perspective : how creative expressions can broaden your perspective. You will do this by reflection on the impact that television and video art had upon a person

Reviews

Write a Review

Programming Languages Questions & Answers

  Write a haskell program to calculates a balanced partition

Write a program in Haskell which calculates a balanced partition of N items where each item has a value between 0 and K such that the difference b/w the sum of the values of first partition,

  Create an application to run in the amazon ec2 service

In this project you will create an application to run in the Amazon EC2 service and you will also create a client that can run on local machine and access your application.

  Explain the process to develop a web page locally

Explain the process to develop a Web page locally

  Write functions

These 14 questions covers java class, Array, link list , generic class.

  Programming assignment

If the user wants to read the input from a file, then the output will also go into a different file . If the user wants to read the input interactively, then the output will go to the screen .

  Write a prolog program using swi proglog

Write a Prolog program using swi proglog

  Create a custom application using eclipse

Create a custom Application Using Eclipse Android Development

  Create a application using the mvc architecture

create a application using the MVC architecture. No scripting elements are allowed in JSP pages.

  Develops bespoke solutions for the rubber industry

Develops bespoke solutions for the rubber industry

  Design a program that models the worms behavior

Design a program that models the worm's behavior.

  Writing a class

Build a class for a type called Fraction

  Design a program that assigns seats on an airplane

Write a program that allows an instructor to keep a grade book and also design and implement a program that assigns seats on an airplane.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd