Upload three files (program.cs),(Employee.cs), and (Department.cs) or C# solution with all files Create a new project,...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Upload three files (program.cs),(Employee.cs), and (Department.cs) or C# solution with all files Create a new project, and within it, import Employee class and create a new class named "Department" Update Employee by • removing attribute department(string) • implementing ToString method to print information about employee Department class has • 4 attributes: name (string), int (id), location (string), employees (Employee array) • constructor that accept values for name(string), id(int), location(string), and numberOfEmployees(int) ▪ initialize employees array using numberOfEmployees and set all array elements to be null • use C# property to get and set values for all attributes • lookupEmployeeByName method: search for employee by name(use Array.find() or Array.FindAll() as helper function). It returns true if at least one employee is found) ▪ input:string ▪ output:bool • addEmployee(Employee emp)method: add employee to employees array. If the array null/empty spots then use them, otherwise use Array.Resize to update the array ▪ input:object of Employee (Employee emp) ▪ output:void • removeEmployee method: remove Employee from employees array. If employee is removed successfully return true otherwise return false.(use Array.find() and Array.IndexOf()) ▪ input:object of Employee (Employee emp) ▪ output: bool • print method: prints information about the department ▪ input:void ▪ output: void Within the main method, instantiate one instance(object) of the Department class denoting it as dept1 oset numof Employees pass to constructor to 2 • use removeEmployee() to remove and employee • use addEmployee() to add 3 employees • using print() to print information about dept • use lookupEmployeeByName() to search for an employee • use removeEmployee() twice to remove an employee added with addEmployee() function • using print() to print information about dept Upload three files (program.cs),(Employee.cs), and (Department.cs) or C# solution with all files Create a new project, and within it, import Employee class and create a new class named "Department" Update Employee by • removing attribute department(string) • implementing ToString method to print information about employee Department class has • 4 attributes: name (string), int (id), location (string), employees (Employee array) • constructor that accept values for name(string), id(int), location(string), and numberOfEmployees(int) ▪ initialize employees array using numberOfEmployees and set all array elements to be null • use C# property to get and set values for all attributes • lookupEmployeeByName method: search for employee by name(use Array.find() or Array.FindAll() as helper function). It returns true if at least one employee is found) ▪ input:string ▪ output:bool • addEmployee(Employee emp)method: add employee to employees array. If the array null/empty spots then use them, otherwise use Array.Resize to update the array ▪ input:object of Employee (Employee emp) ▪ output:void • removeEmployee method: remove Employee from employees array. If employee is removed successfully return true otherwise return false.(use Array.find() and Array.IndexOf()) ▪ input:object of Employee (Employee emp) ▪ output: bool • print method: prints information about the department ▪ input:void ▪ output: void Within the main method, instantiate one instance(object) of the Department class denoting it as dept1 oset numof Employees pass to constructor to 2 • use removeEmployee() to remove and employee • use addEmployee() to add 3 employees • using print() to print information about dept • use lookupEmployeeByName() to search for an employee • use removeEmployee() twice to remove an employee added with addEmployee() function • using print() to print information about dept
Expert Answer:
Answer rating: 100% (QA)
Heres how you could structure your code based on the requirements given Employeecs csharp public class Employee public string Name get set public int ... View the full answer
Related Book For
Accounting Information Systems basic concepts and current issues
ISBN: 978-0078025334
3rd edition
Authors: Robert Hurt
Posted Date:
Students also viewed these programming questions
-
. Examining Structural Actions in the Frontier: Describe what is meant by acting in the structural portion of the frontier and present one example of an organization participating in actions that...
-
This assignment reviews object-oriented programming concepts such as classes, methods, constructors, accessor methods, and access modifiers. It makes use of an array of objects as a class data...
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
How might Tommy Hilfiger use advertising as a signal? How is a signal sent and how does it work? Suppose that Tommy Hilfigers marginal cost of a jacket is a constant $100 and the total fixed cost at...
-
Crown Point Inc. is in the process of arranging a long-term lease for the company's equipment. The company has dismissed the option of borrowing money from the bank and buying the equipment and is...
-
The equity section of Sosa SA appears below as of December 31, 2022. Net income for 2022 reflects a total effective tax rate of 20%. Included in the net income figure is a loss of R$12,000,000...
-
What three elements must be included in the caption of a complaint?
-
The 10-K of NIKE is reproduced in Appendix C. Required (a) What are the major sources of cash for the company, and what is it doing with that cash? (b) Were there any significant transactions in...
-
How can organizing and consulting assist and support you in your current career track or future? What aspects of this course will support? ASAP PLEASE ...ASAP
-
Record the following transactions in General Ledger accounts of the General Fund of Fergieville. 1. Incurred salaries of $300,000, $280,000 of which was paid. 2. A long-term note ($400,000 face...
-
How has this conversation impacted your view of this career field? Are you still considering the field? Why or why not? Who did your informational interview with, and what is a description of their...
-
Compare and contrast the Shareholder vs the Stakeholder models of corporate accountability - Describe each model. - Describe the major pros/cons of each model. - Which one do you adhere to and why?
-
Explain the importance of continual improvement. Compare and contrast the three types. What are the primary sub-types of practices within each? Conduct online research to find at least ONE real...
-
Present a 6-8 minutes persuasive speech persuading the audience about a social problem that our society needs to address. Use the problem-cause-solution organization to construct your argument and...
-
13. A 5.0-kg box slides down on the surface on a ramp (incline) that rises at 37 above the horizontal. If the acceleration of the box is 7.2 m/s, what is the force of friction on the box? (The x-...
-
Compare and contrast action research and process consultation and appreciative inquiry.
-
Dingers Corp. needs to raise cash for expansion and has decided a public equity issue is the way to go. (This is a secondary equity offering. Dingers stock already trades publicly.) Expansion costs...
-
14. In testing the existence assertion, an auditor ordinarily works from the a. Financial statements to the accounting records. b. General journal to the general ledger. c. Supporting evidence to the...
-
Which of the 10 standards is violated in each of the following independent situations? Some situations may violate more than one. a. A team of auditors, each with varying levels of experience,...
-
Do a Google search for the AICPA Top Ten Technologies. Investigate the most recent list; describe the process used to develop the list. Work with a group of students to investigate one or more of the...
-
Several potential problems in the sales/collection process are listed below. Indicate at least two internal controls that would address the problem. For each control you suggest, explain whether it...
-
The \(T d S\) equation \(T d S=C_{P} d T-T\left(\frac{\partial V}{\partial T} ight)_{P} d P\) is valid where entropy is a function of (a) \(T\) and \(P\) (b) \(P\) and \(V\) (c) \(T\) and \(V\) (d)...
-
The inversion temperature of hydrogen is (a) \(315 \mathrm{~K}\) (b) \(202 \mathrm{~K}\) (c) \(275 \mathrm{~K}\) (d) \(345 \mathrm{~K}\).
-
The inversion temperature of helium is (a) \(460 \mathrm{~K}\) (b) \(40 \mathrm{~K}\) (c) \(620 \mathrm{~K}\) (d) \(823 \mathrm{~K}\).
Study smarter with the SolutionInn App