Display the total salary paid for each department

Assignment Help Basic Computer Science
Reference no: EM131020773

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.

Reference no: EM131020773

Questions Cloud

How is audit risk affected by inherent risk : Be sure to substantiate your findings by reviewing Statements on Auditing Standards (SAS) on the American Institute of CPAs (AICPA) website.
Research issues in enterprise architecture : Analyze the types of organizational and computer architectures for integrating systems.
What did obama mean by phrase losing a job in the process : While running for president, Barack Obama made the following statement: "Well, look, people don't want a cheaper T-shirt if they're losing a job in the process." What did Obama mean by the phrase "losing a job in the process"?
Why is chinese company likely to end up manufacturing toy : In a newspaper column, Frank Wolak, a professor of economics at Stanford, referred to "the economic forces that lead to most children's toys being developed in the United States and mass-produced in China and other developing countries." What econ..
Display the total salary paid for each department : 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.
Find the function whose tangent line has the slope : Find the function whose tangent line has the slope ex for each value of x, and whose graph passes through (0, 5). Find the function whose tangent line has the slope (3x2 + 1)‾ for each value of x and whose graph passes through (0, 2).
What is comparative advantage : A World Trade Organization (WTO) publication calls comparative advantage "arguably the single most powerful insight in economics." What is comparative advantage? What makes it such a powerful insight?
Compute the total cash dividends paid to each class : Compute the total cash dividends paid to each class of stock in 2009 through 2012.
Difference in absolute advantage and comparative advantage : What is the difference between absolute advantage and comparative advantage? Will a country always be an exporter of a good in the production of which it has an absolute advantage? Briefly explain.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  What do the terms "syntactic sugar" and "syntactic salt"

What do the terms "syntactic sugar" and "syntactic salt" mean? From your knowledge of the C# programming language, list at least five syntactic sugar and salt features.

  Write files which do not reside at root or master directory

Provide the example of names of three files from own computer that do not reside at the root or master directory. For each file, list both therelative filename and its complete filename.

  What is the simplest form of the boolean function

What is the simplest form of the Boolean function y′ . (x + y)?

  Explain organization''s information security department

You recently accepted this job and have completed your first 3 months in the position. There are many security concerns, and the environment lacks policies and standards. You would like to address this, but you must first research the standard app..

  Digital commerce and ebusiness short paper

digital commerce and ebusiness short paper

  Write the output from instrument class methods

Write the output from your Instrument class methods to a text file that a user entered from the command line arguments (e.g. java Mynamep3tst myfilename.txt). This allows your program to accept filenames from the user via a command line argument.

  Identify one possible application of business intelligence

Consider an industry or company with which you have some familiarity, and identify at least one possible application of business intelligence (BI) in the company. Justify your decision by presenting the business value the BI system could deliver.

  Explaining threat category

An individual threat can be represented in more than one threat category. If a hacker hacks into a network, copies a few files.

  Write a program that reads two coordinates

Write a program that reads two coordinates (x1, y1) and (x2, y2), and prints the slope of the line passing through these two points.

  It has two member variables: m range is a pointer

It has two member variables: m range is a pointer to an array of ints, and m size the number of elements in that array.

  Create account ease of use age appropriateness

Go through and find2 NETS standardshttp://www.iste.org/standards/nets-for-studentsfor each of the above lesson plans you chose and explain why they would be met when using this Web 2.0 tool with the lesson plan you chose.

  Class template for the class set given

Implement the following Set class. A set is a collection of items with no duplicates. The following class implements a set of integers.

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