SlideShare a Scribd company logo
Assignment Instructions 2_7a
Explain the interrelationships between planning, organizing,
directing, controlling, and leading.
This is a one-page assignment. Should contain academic
references and be thoroughly researched.
Please include an Abstract, Details Heading/Subheading and
Conclusion. Also,all include (cites), attach the
websites/details/links with the references. I have been asked for
them by my professor
Let me know if you any questions.
Please let me know if you any questions.
You will want to use the Week 3 project as the starting point for
the lab. To do this, you will want to create a new project by
following these steps:
1. Create a new project named
"CIS247_WK4_Lab_LASTNAME". An empty project will then
be created.
2. Delete the default Program.cs file that is created.
3. Now that we are beginning to add more classes to our
projects the
Solution
Explorer can become difficult to organize so you will create
folders to hold the Presentation Tier and Logic Tier Files in
order to organize the project. One thing to remember, even
though we only have a few files in our project, a professional
program will have 100's if not 1000's of files in a project so you
will want to get practice in organizing your project files in a
logical folder heirarchy and we will use the Tiered Architecture
structure shown in the UML Class diagram for the folder
structure. You will find that creating folders within MS Visual
Studio is very similiar to creating folders in Windows Explorer.
Follow these directions to create the folders:
1. Select the project and then right click
2. Select Add
3. Select New Folder
4. Enter the name of the folder
4. Add the following three folders to your project (1)
Presentation Tier, (2) Logic Tier, and (3) Utilities.
5. You are going to add the files from the previous week lab to
the project just as you did before, but now you add the existing
files to the corresponding folder
6. Select the PresentationTier folder, right click and select Add
then Existing Item, navigate to your previous week's project and
select the InputUtitilies.cs and Program.cs files and click add.
These two files will then be added to the Presentation. [Hint:
you can also drag and drop the files directly from Windows
Explorer directly into the corresponding folder in your project!]
7. Add the previous week's Employee.cs file to the Logic Tier
folder. You will also add the new Benefits class to this folder.
8. Add the ApplicationUtilities.cs file to the Utilities folder.
9. Your solution explorer should look similiar to the following
(note: you can rename any folder by selecting the folder, right
click, and then Rename just like you do in Windows).
10. The namespaces for the classes should all be "Employee",
but you should verify that the namespaces for all the classes are
the same.
11. Update the program information in the
ApplicationUtilities.DisplayApplicationInformation method to
reflect your name, current lab, and program description.
12. Build and execute the project.
STEP 3: Create the Benefits Class
Back to Top
Using the Benefit class diagram as a guide, build the Benefit
class by adding a new class to the Logic Tier folder.
1. Create a property for each of the listed private attributes and
validate the provided value using the following rules:
a. If the insurance company provided is empty or null then set
the healthInsuranceCompany to
DEFAULT_HEALTH_INSURANCE
b. If the provided life insurance value is between the
MIN_LIFE_INSURANCE and MAX_LIFE_INSURANCE
(inclusive) then set lifeInsuranceAmount to the provided value;
if the provided value is less than MIN_LIFE_INSURANCE set
the lifeInsuranceAmount to MIN_LIFE_INSURANCE; else if
provided value is greater than MAX_LIFE_INSURANCE; set
thelifeInsuranceAmount to MAX_LIFE_INSURANCE.
c. If the provided vacation days value is between the
MIN_VACATION and MAX_VACATION (inclusive) the set the
vacationDays to the provided value; if the provided value is less
than MIN_VACATION set the vacationDays to
MIN_VACATION; else if provided value is greater than
MAX_VACATION set the vacationDays value to
MAX_VACATION.
2. In the parameterized constructor, set the attributes so that the
properties are used, which ensures that attributes are validated
prior to be set.
3. Create an overridden ToString method that collects and
formats the attribute information for the benefit object. Ensure
to display life insurance amount in currency format.
STEP 4: Modify the Employee Class
Back to Top
Using the Employee class diagram as a guide, modify the
Employee class
1. Add a private attribute called "benefit" to the employee class
of type Benefits
2. Create a public Benefit property that returns the benefit
attribute. In the set method of the property, if the provided
value is null then re-instantiate the benefit variable; otherwise,
set the provided value to the benefit variable. [Hint: to check if
a object is null use the syntax "if (object != null)"]
3. In the default constructor, instantiate the benefit variable
using the Benefits default constructor
4. In the parameterized constructor, add a benefit argument of
type Benefits, and then set the value of this parameter to the
Benefit property (using the property will ensure that any null
benefit object is correctly instansiated.)
5. Modify the ToString method to the Employee class, by
adding a call to the Benefits ToString methods at the end of the
Employee ToString method.
STEP 5: Modify the Main Method
Back to Top
In the previous labs you learned how to access an object/class
methods and properties using the DOT notation. For example, to
access the calculatePay method of an employee object you used
a statement similiar to:
employee1.CalculateWeeklyPay(modifiedSalary)
Notice that the Employee class now has a public Benefit
object inside it. This means that you can access the set methods
of the Benefit object using the transitive notation:
containingObject.containedObject.methodName()
or
containingObject.containedObject.PropertyName
That is to access the members of contained object, you start at
the containing object, then "transit" to the contained object,
then to the contained objects members.
As an example, to set the life insurance amount of an employee
object, the statement would look something like:
employee1.Benefit.LifeInsuranceAmount = 100000;
Notice, the containing object is "employee1", the contained
object is "Benefit", and the property of Benefit we are accessing
is LifeInsuranceAmount.
The code in the previous week's project performed the following
operations
1. Display the program information.
2. Create an Employee object using the default constructor.
3. Prompt for and then set the first name, last name, gender,
dependents, and annual salary. Remember to use the appropriate
methods in the InputUtilties class to prompt for and retreive the
values.
4. Display the employee information.
5. After the first employee information is provided, display the
number of employees created.
6. Prompt the user to provide an updated annual salary for
employee1, retrieve the value and invoke the overloaded
CalculateWeeklyPay, and then display only the updated weekly
pay.
7. Create a second Employee object using the multi-argument
constructor using data of your choosing that is of the correct
type for each input.
8. Display the Employee information for the second employee
object.
9. Create a third Employee object using the parameterized
constructor setting each of the attributes with the following
values: "Sue", "Smith", 'F', 15, 500000.0
10. Display the employee information for the third Employee
object and verify that the dependents and annual salary values
have been set to the maximum values by the properties. If not,
make sure you change the parameterized constructor to use the
properties to set the attributes.
11. Display the number of employees created.
12. Terminate the application
Once your code is working and implements the previous week's
operations, modify the code to implement the following new
requirements (updated code should implement all previous
requirements except as noted below).
1. After you collect the information for the first employee
object, prompt for and collect the Health Insurance Company,
the LifeInsuranceAmount, and the number of vacation days.
2. Display the updated employee 1 information
3. Display the number of employees created.
4. Create a new, standalone benefits object using the multi-
argument constructor using data of your choosing that is of the
correct type for each input.
5. Modify the second employee object instantiation and add the
newly created benefit object to the constructor call.
6. Display the updated employee 2 information
7. Display the number of employees created.
8. Create a new, standalone benefits object using the multi-
argument constructor using the following invalid data "" (empty
string), 10000000, -10
9. Modify the third employee object instantiation and add the
newly created benefit object to the constructor call.
10. Display the updated employee 3 information and verify that
the default values for the benefit object have been correctly set.
11. Display the number of employees created.
STEP 6: Compile and Test
Back to Top
When done, compile and execute your code. Debug errors until
your code is error-free. Check your output to ensure that you
have the desired output, modify your code as necessary, and
rebuild. The following shows some sample output, but your
output may look different.
STEP 7: Submit Deliverables
Back to Top
· Capture the output window and paste it into a Word
Document.
· Put the zip file and screen shots (Word document) in the
Dropbox.

More Related Content

DOCX
CIS 247C iLab 4 of 7: Composition and Class Interfaces
DOC
Cis247 i lab 4 composition and class interfaces
DOC
Cis247 a ilab 4 composition and class interfaces
DOC
Cis247 a ilab 4 composition and class interfaces
DOC
Cis247 a ilab 4 composition and class interfaces
DOCX
33.docxSTEP 1 Understand the UML Diagram Analyze and under.docx
DOCX
Please be advised that there are four (4) programs just like this on.docx
DOC
Cis247 i lab 5 inheritance
CIS 247C iLab 4 of 7: Composition and Class Interfaces
Cis247 i lab 4 composition and class interfaces
Cis247 a ilab 4 composition and class interfaces
Cis247 a ilab 4 composition and class interfaces
Cis247 a ilab 4 composition and class interfaces
33.docxSTEP 1 Understand the UML Diagram Analyze and under.docx
Please be advised that there are four (4) programs just like this on.docx
Cis247 i lab 5 inheritance

Similar to Assignment Instructions 2_7aExplain the interrelationships bet.docx (20)

DOC
Cis247 a ilab 5 inheritance
DOC
Cis247 a ilab 5 inheritance
DOCX
Cyber Security wk 8 paperAssignment 2 Implementing Network a.docx
DOC
Cis247 a ilab 3 overloaded methods and static methods variables
DOCX
1 Goals. 1. To use a text file for output and later for in.docx
DOCX
Cis247 i lab 2 of 7 employee class
DOC
Cis247 a ilab 3 overloaded methods and static methods variables
DOC
Cis247 i lab 3 overloaded methods and static methods variables
DOC
Cis 247 all i labs
DOC
Cis247 a ilab 2 of 7 employee class
DOC
Cis247 a ilab 2 of 7 employee class
DOC
Cis247 i lab 2 of 7 employee class
PDF
Oracle Compensation Management
PDF
Login methodology for Primavera V8.3 (EPPM)
PDF
Open a new project in Visual Studio Community and name it in the form.pdf
DOCX
Comp 220 ilab 3 of 7
PDF
Logical Triggers.pdf
PDF
Object Oriented PHP - PART-1
PDF
Open a new project in Visual Studio Community and name it in the form.pdf
DOCX
M.tech oops through_c++_labmanual1 (1)
Cis247 a ilab 5 inheritance
Cis247 a ilab 5 inheritance
Cyber Security wk 8 paperAssignment 2 Implementing Network a.docx
Cis247 a ilab 3 overloaded methods and static methods variables
1 Goals. 1. To use a text file for output and later for in.docx
Cis247 i lab 2 of 7 employee class
Cis247 a ilab 3 overloaded methods and static methods variables
Cis247 i lab 3 overloaded methods and static methods variables
Cis 247 all i labs
Cis247 a ilab 2 of 7 employee class
Cis247 a ilab 2 of 7 employee class
Cis247 i lab 2 of 7 employee class
Oracle Compensation Management
Login methodology for Primavera V8.3 (EPPM)
Open a new project in Visual Studio Community and name it in the form.pdf
Comp 220 ilab 3 of 7
Logical Triggers.pdf
Object Oriented PHP - PART-1
Open a new project in Visual Studio Community and name it in the form.pdf
M.tech oops through_c++_labmanual1 (1)

More from ssuser562afc1 (20)

DOCX
Pick an Apollo Mission that went to the Moon.  Some mission only orb.docx
DOCX
Pick a topic from data.gov that has large number of data sets on wid.docx
DOCX
Pick an animal with sophisticated communication. Quickly find and re.docx
DOCX
Pick a real healthcare organization or create your own. Think about .docx
DOCX
PHYS 102In the Real World” Discussion TopicsYou may choose yo.docx
DOCX
Photosynthesis and Cellular RespirationCellular respiration .docx
DOCX
Philosophy of Inclusion Research SupportIt is not enough to simp.docx
DOCX
PHYSICS DATA SHEET.docx
DOCX
Physical Assessment Reflection Consider your learning and gr.docx
DOCX
Phonemic Awareness TableTaskScriptingDescription and.docx
DOCX
Philosophy 2582 - Media Ethics Paper 1 (Noam Chomsky) 
.docx
DOCX
Pick a large company you like. Find their Statement of Cash Flow.docx
DOCX
Philosophy 7 Asian Philosophy (Fall 2019) Paper Guidelines .docx
DOCX
PIC.jpga.zipAPA.pptAPA Style--Review.docx
DOCX
PHIL101 B008 Win 20 ! # AssignmentsAssignmentsAssignmen.docx
DOCX
Phase 3 Structured Probl.docx
DOCX
Phil 2101 Final PaperGuidelines Approximately 5 pages, doubl.docx
DOCX
Perspectives on WarInstructionsAnalyze After watching .docx
DOCX
pestle research for chile bolivia paraguay uruguay .docx
DOCX
Pg. 04Question Four Assignment 2Deadline Saturd.docx
Pick an Apollo Mission that went to the Moon.  Some mission only orb.docx
Pick a topic from data.gov that has large number of data sets on wid.docx
Pick an animal with sophisticated communication. Quickly find and re.docx
Pick a real healthcare organization or create your own. Think about .docx
PHYS 102In the Real World” Discussion TopicsYou may choose yo.docx
Photosynthesis and Cellular RespirationCellular respiration .docx
Philosophy of Inclusion Research SupportIt is not enough to simp.docx
PHYSICS DATA SHEET.docx
Physical Assessment Reflection Consider your learning and gr.docx
Phonemic Awareness TableTaskScriptingDescription and.docx
Philosophy 2582 - Media Ethics Paper 1 (Noam Chomsky) 
.docx
Pick a large company you like. Find their Statement of Cash Flow.docx
Philosophy 7 Asian Philosophy (Fall 2019) Paper Guidelines .docx
PIC.jpga.zipAPA.pptAPA Style--Review.docx
PHIL101 B008 Win 20 ! # AssignmentsAssignmentsAssignmen.docx
Phase 3 Structured Probl.docx
Phil 2101 Final PaperGuidelines Approximately 5 pages, doubl.docx
Perspectives on WarInstructionsAnalyze After watching .docx
pestle research for chile bolivia paraguay uruguay .docx
Pg. 04Question Four Assignment 2Deadline Saturd.docx

Recently uploaded (20)

PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PDF
01-Introduction-to-Information-Management.pdf
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PPTX
Cell Types and Its function , kingdom of life
PDF
Pre independence Education in Inndia.pdf
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PPTX
PPH.pptx obstetrics and gynecology in nursing
PPTX
Cell Structure & Organelles in detailed.
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PDF
Computing-Curriculum for Schools in Ghana
PDF
RMMM.pdf make it easy to upload and study
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PPTX
Lesson notes of climatology university.
PDF
Complications of Minimal Access Surgery at WLH
PPTX
Pharma ospi slides which help in ospi learning
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
01-Introduction-to-Information-Management.pdf
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
Cell Types and Its function , kingdom of life
Pre independence Education in Inndia.pdf
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
Abdominal Access Techniques with Prof. Dr. R K Mishra
PPH.pptx obstetrics and gynecology in nursing
Cell Structure & Organelles in detailed.
FourierSeries-QuestionsWithAnswers(Part-A).pdf
Computing-Curriculum for Schools in Ghana
RMMM.pdf make it easy to upload and study
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
Module 4: Burden of Disease Tutorial Slides S2 2025
Final Presentation General Medicine 03-08-2024.pptx
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
Lesson notes of climatology university.
Complications of Minimal Access Surgery at WLH
Pharma ospi slides which help in ospi learning

Assignment Instructions 2_7aExplain the interrelationships bet.docx

  • 1. Assignment Instructions 2_7a Explain the interrelationships between planning, organizing, directing, controlling, and leading. This is a one-page assignment. Should contain academic references and be thoroughly researched. Please include an Abstract, Details Heading/Subheading and Conclusion. Also,all include (cites), attach the websites/details/links with the references. I have been asked for them by my professor Let me know if you any questions. Please let me know if you any questions. You will want to use the Week 3 project as the starting point for the lab. To do this, you will want to create a new project by following these steps: 1. Create a new project named "CIS247_WK4_Lab_LASTNAME". An empty project will then be created. 2. Delete the default Program.cs file that is created. 3. Now that we are beginning to add more classes to our projects the Solution
  • 2. Explorer can become difficult to organize so you will create folders to hold the Presentation Tier and Logic Tier Files in order to organize the project. One thing to remember, even though we only have a few files in our project, a professional program will have 100's if not 1000's of files in a project so you will want to get practice in organizing your project files in a logical folder heirarchy and we will use the Tiered Architecture structure shown in the UML Class diagram for the folder structure. You will find that creating folders within MS Visual Studio is very similiar to creating folders in Windows Explorer. Follow these directions to create the folders: 1. Select the project and then right click 2. Select Add 3. Select New Folder 4. Enter the name of the folder 4. Add the following three folders to your project (1) Presentation Tier, (2) Logic Tier, and (3) Utilities. 5. You are going to add the files from the previous week lab to the project just as you did before, but now you add the existing files to the corresponding folder 6. Select the PresentationTier folder, right click and select Add
  • 3. then Existing Item, navigate to your previous week's project and select the InputUtitilies.cs and Program.cs files and click add. These two files will then be added to the Presentation. [Hint: you can also drag and drop the files directly from Windows Explorer directly into the corresponding folder in your project!] 7. Add the previous week's Employee.cs file to the Logic Tier folder. You will also add the new Benefits class to this folder. 8. Add the ApplicationUtilities.cs file to the Utilities folder. 9. Your solution explorer should look similiar to the following (note: you can rename any folder by selecting the folder, right click, and then Rename just like you do in Windows). 10. The namespaces for the classes should all be "Employee", but you should verify that the namespaces for all the classes are the same. 11. Update the program information in the ApplicationUtilities.DisplayApplicationInformation method to reflect your name, current lab, and program description. 12. Build and execute the project. STEP 3: Create the Benefits Class Back to Top Using the Benefit class diagram as a guide, build the Benefit class by adding a new class to the Logic Tier folder. 1. Create a property for each of the listed private attributes and validate the provided value using the following rules:
  • 4. a. If the insurance company provided is empty or null then set the healthInsuranceCompany to DEFAULT_HEALTH_INSURANCE b. If the provided life insurance value is between the MIN_LIFE_INSURANCE and MAX_LIFE_INSURANCE (inclusive) then set lifeInsuranceAmount to the provided value; if the provided value is less than MIN_LIFE_INSURANCE set the lifeInsuranceAmount to MIN_LIFE_INSURANCE; else if provided value is greater than MAX_LIFE_INSURANCE; set thelifeInsuranceAmount to MAX_LIFE_INSURANCE. c. If the provided vacation days value is between the MIN_VACATION and MAX_VACATION (inclusive) the set the vacationDays to the provided value; if the provided value is less than MIN_VACATION set the vacationDays to MIN_VACATION; else if provided value is greater than MAX_VACATION set the vacationDays value to MAX_VACATION. 2. In the parameterized constructor, set the attributes so that the properties are used, which ensures that attributes are validated prior to be set. 3. Create an overridden ToString method that collects and formats the attribute information for the benefit object. Ensure to display life insurance amount in currency format. STEP 4: Modify the Employee Class
  • 5. Back to Top Using the Employee class diagram as a guide, modify the Employee class 1. Add a private attribute called "benefit" to the employee class of type Benefits 2. Create a public Benefit property that returns the benefit attribute. In the set method of the property, if the provided value is null then re-instantiate the benefit variable; otherwise, set the provided value to the benefit variable. [Hint: to check if a object is null use the syntax "if (object != null)"] 3. In the default constructor, instantiate the benefit variable using the Benefits default constructor 4. In the parameterized constructor, add a benefit argument of type Benefits, and then set the value of this parameter to the Benefit property (using the property will ensure that any null benefit object is correctly instansiated.) 5. Modify the ToString method to the Employee class, by adding a call to the Benefits ToString methods at the end of the Employee ToString method. STEP 5: Modify the Main Method Back to Top In the previous labs you learned how to access an object/class methods and properties using the DOT notation. For example, to access the calculatePay method of an employee object you used a statement similiar to:
  • 6. employee1.CalculateWeeklyPay(modifiedSalary) Notice that the Employee class now has a public Benefit object inside it. This means that you can access the set methods of the Benefit object using the transitive notation: containingObject.containedObject.methodName() or containingObject.containedObject.PropertyName That is to access the members of contained object, you start at the containing object, then "transit" to the contained object, then to the contained objects members. As an example, to set the life insurance amount of an employee object, the statement would look something like: employee1.Benefit.LifeInsuranceAmount = 100000; Notice, the containing object is "employee1", the contained object is "Benefit", and the property of Benefit we are accessing is LifeInsuranceAmount. The code in the previous week's project performed the following operations 1. Display the program information. 2. Create an Employee object using the default constructor. 3. Prompt for and then set the first name, last name, gender, dependents, and annual salary. Remember to use the appropriate methods in the InputUtilties class to prompt for and retreive the values. 4. Display the employee information.
  • 7. 5. After the first employee information is provided, display the number of employees created. 6. Prompt the user to provide an updated annual salary for employee1, retrieve the value and invoke the overloaded CalculateWeeklyPay, and then display only the updated weekly pay. 7. Create a second Employee object using the multi-argument constructor using data of your choosing that is of the correct type for each input. 8. Display the Employee information for the second employee object. 9. Create a third Employee object using the parameterized constructor setting each of the attributes with the following values: "Sue", "Smith", 'F', 15, 500000.0 10. Display the employee information for the third Employee object and verify that the dependents and annual salary values have been set to the maximum values by the properties. If not, make sure you change the parameterized constructor to use the properties to set the attributes. 11. Display the number of employees created. 12. Terminate the application Once your code is working and implements the previous week's operations, modify the code to implement the following new requirements (updated code should implement all previous requirements except as noted below).
  • 8. 1. After you collect the information for the first employee object, prompt for and collect the Health Insurance Company, the LifeInsuranceAmount, and the number of vacation days. 2. Display the updated employee 1 information 3. Display the number of employees created. 4. Create a new, standalone benefits object using the multi- argument constructor using data of your choosing that is of the correct type for each input. 5. Modify the second employee object instantiation and add the newly created benefit object to the constructor call. 6. Display the updated employee 2 information 7. Display the number of employees created. 8. Create a new, standalone benefits object using the multi- argument constructor using the following invalid data "" (empty string), 10000000, -10 9. Modify the third employee object instantiation and add the newly created benefit object to the constructor call. 10. Display the updated employee 3 information and verify that the default values for the benefit object have been correctly set. 11. Display the number of employees created. STEP 6: Compile and Test Back to Top When done, compile and execute your code. Debug errors until your code is error-free. Check your output to ensure that you have the desired output, modify your code as necessary, and
  • 9. rebuild. The following shows some sample output, but your output may look different. STEP 7: Submit Deliverables Back to Top · Capture the output window and paste it into a Word Document. · Put the zip file and screen shots (Word document) in the Dropbox.