• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Cis 247 all i labs
 

Cis 247 all i labs

on

  • 745 views

 

Statistics

Views

Total Views
745
Views on SlideShare
745
Embed Views
0

Actions

Likes
0
Downloads
0
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft Word

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Cis 247 all i labs Cis 247 all i labs Document Transcript

    • CIS 247 All iLabs: Devry University:Copy and paste this link to get the tutorial:http://homeworkfox.com/tutorials/general-questions/4477/cis-247-all-ilabs-devry-university/CIS247A iLab 1 of 7: Creating a UserInterfaceiLab 1 of 7: Creating a User InterfaceScenario and SummaryThis program creates the basic user interface code that can be used in the following weeks iLabassignments. The assignment will help you get started using the programming environment andsome practice with coding. You will also be able to reuse much, if not all, of the code in laterassignments.In this program, you will create the following methods:DisplayApplicationInformation, which will provide the program user some basic informationabout the program. DisplayDivider, which will provide a meaningful output separator betweendifferent sections of the program output. GetInput, which is a generalized function that willprompt the user for a specific type of information, then return the string representation of theuser input. TerminateApplication, which provides a program termination message and thenterminates the application.Using these methods, you will construct a program that prompts the user for the following:your name, which will be a string data type; your age, which will be an integer data type; the gasmileage for your car, which will be a double data type; and a display of the collectedinformation.Also, note that the program should contain a well-documented program header.DeliverablesStep
    • DeliverableStep 4Screenshot of running program resultsStep 5Zip file with entire Lab filesPreparation:If you are using the Citrix remote lab, follow the login instructions located in the iLab tab inCourse Home. Locate the Microsoft Visual Studio icon and launch the program.iLAB STEPSSTEP 1: Review the DesignDownload the program description and puesdocode design, and make sure you fully understandthe program design and ask any questions that you may have BEFORE you start programming.Click Week 1 Lab Design to download program design.STEP 2: Construct the ProgramStart Microsoft Visual Studio and create a new project titled"CIS247C_WK1_Lab_LASTNAME". Using the design, construct the methods. Once themethods are constructed, use the design to create the main program.STEP 3: Compile and TestWhen done, ensure that there are no compile errors. If there are errors, open up the Error list andfix all listed errors. Execute your code and check your output to ensure that you have the desiredoutput. If you need to fix anything, close your execution window, modify your code asnecessary, and rebuild.STEP 4: Screen PrintsCapture the results of each test and paste them into a Word document. Below is a sampleprogram output.Screenshot of a program output that reads: Welcome to your first Object Oriented Program--Employee ClassCIS247C, Week 2 Lab Name: Prof.Nana Liu *************** Start Program
    • *************** *************** Get Name *************** Please enter your nameNanaLiu Your name is: Nana Liu *************** Get Age *************** Please enter yourage100 Your age is: 100 *************** Get Mileage *************** Please enter yourmileage52.16 Your car MPG is: 52.16 The end of the CIS247C Week1 iLab. Press any key tocontinue. . .STEP 5: Submit DeliverablesPut all of the Project files into a zip file. Put the zip file, test plan, and screen shots (Worddocument) in the Dropbox.Submit your lab to the Dropbox located on the silver tab at the top of this page. For instructionson how to use the Dropbox, read these Step-by-Step Instructions or watch this DropboxTutorial.See Syllabus "Due Dates for Assignments & Exams" for due date information.CIS247A iLab 2 of 7: Employee ClassGeneral Questions - General General QuestionsiLab 2 of 6: Employee ClassScenario and SummaryWe begin our investigation of object-oriented programming by creating an object-orientedprogram with a class called Employee. You will create two objects based on the Employee class,along with a class that contains the main method. The attributes, constructors, and methods forthis class must satisfy the requirements in Steps 1 through 3. After you create the objects, youwill prompt the user for information and then display it.We will want to ensure that this first class is well-constructed and tested since we will extendthis class in Labs 3 through 6.DeliverablesDue this week:Capture the Console output window and paste it into a Word document. Zip the project folderfiles. Put the zip file and screen shots (Word document that contains programming code andscreen shots of program output) in the Dropbox.iLAB STEPS
    • STEP 1: Understand the UML Class DiagramUse the following UML diagram to build the class. The first section specifies the attributes. Thesecond section specifies the behaviors, and the first character specifies the access modifier value,where:"-" means that the class member is private, and "+" means that the class member is public.Employee - firstName : string - lastName : string - gender : char - dependents : int - annualSalary: double +Employee() +Employee(in first : string, in last : string, in gen : char, in dep : int, insalary : double) +calculatePay() : double +displayEmployee() : void +getFirstName() : string+setFirstName(in first : string) +getLastName() : string +setLastName(in last : string)+getGender() : char +setGender(in gen : char) +getDependents() : int +setDependents(in dep :int) +getAnnualSalary() : double +setAnnualSalary(in salary : double)STEP 2: Code the Employee ClassCreate a new project called "CIS247B_Week2Lab_YourName". Using the provided ClassDiagram from Step 1, code the Employee class in the new project (i.e., "Realize the UML Classdiagrams"). The default constructor should set the attributes as follows: , , (for unknown), , and ,000. The multi-arg constructor should initialize all of the attributes using values passed in usingits parameter list. As shown in the Class diagram, each attribute should have a "getter" to retrievethe stored attribute value, and a "setter" that modifies the value. The calculatePay( ) method ofthe Employee class should return the value of annual salary divided by 52 (return annualSalary /52;). The displayEmployee() method should display all the attributes of the Employee object in awell-formatted string with logical labels applied to each attribute. Dont forget to callcalculatePay from within the displayEmployee method in order to display the Employeesweekly pay as well!STEP 3: Code the Main ProgramIn the Main class, create code statements that perform the following operations. Be sure youfollow proper commenting and programming styles (header, indentation, line spacing, etc.).Create an Employee object using the default constructor. Prompt for and then set the first name,last name, gender, dependents, and annual salary. (Remember that you have to convertgender, dependents, and annual salary from strings to the appropriate data type.) Usingyour code from last week, display a divider that contains the string "Employee Information"Format the currency using the following formatting services:cout<<"Annual Salary:t" << setprecision(2)<<showpoint<<fixed<<annualSalary << "n";Display the Employee information. Create a second Employee object using the multi-argumentconstructor, setting each of the attributes with appropriate valid values. Using your code fromlast week, display a divider that contains the string "Employee Information". Display theEmployee information for the second Employee object.
    • STEP 4: Compile and TestWhen done, compile and run your code.Then, debug any 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.STEP 5: Screen PrintsCapture the Console output window and paste into a Word document. The following is a samplescreen.Screenshot of a program output that reads: Welcome to your first Object Oriented Program--Employee ClassCIS247C, Week 2 Lab Name: Prof.Nana Liu *************** Employee 1*************** Please enter your First Name Nana Please enter your Last Name Liu Pleaseenter your Gender Female Please enter your Dependents 2 Please enter your Annual Salary60000 Employee Information ___________________________________________ Name: NanaLiu Gender: F Dependents: 2 Annual Salary: 60000.00 Weekly Salary 1153.85*************** Employee 2 *************** Name: Mary Noia Gender: F Dependents: 2Annual Salary: 150000.00 Weekly Salary: 2884.62 The end of the CIS247C Week 1 iLab. Pressany key to continue...STEP 6: Submit DeliverablesCapture the Console output window and paste into a Word document. Put the zip file and screenshots (Word document that contains programming code and screen shots of program output) inthe Dropbox.Submit your lab to the Dropbox located on the silver tab at the top of this page. For instructionson how to use the Dropbox, read these Step-by-Step Instructions or watch this DropboxTutorial.See Syllabus "Due Dates for Assignments & Exams" for due date information.CIS247A iLab 3: Overloaded Methods andStatic Methods / VariablesGeneral Questions - General General QuestionsiLab 3 of 6: Overloaded Methods and Static Methods / Variables
    • Scenario and SummaryThe objective of the lab is to take the UML Class diagram and enhance last weeks Employeeclass by making the following changes:Create a static variable called numEmployees that holds an int and initialize it to zero. This willallow us to count all the Employee objects created in the main class. Increment numEmployeesin all of the constructors Add overloaded versions of setDependents and setAnnualSalary thataccept strings. This way, we will have two "set" methods for both dependents and annual salary;one that accepts a string, and one that accepts its default data type.DeliverablesDue this week:Capture the Console output window and paste it into a Word document. Zip the project folderfiles. Put the zip file and screen shots (Word document that contains programming code andscreen shots of program output) in the Dropbox.iLAB STEPSSTEP 1: Understand the UML DiagramEmployee - firstName : string - lastName : string - gender : char - dependents : int - annualSalary: double - static numEmployees : +Employee() +Employee(in fname : String, in lname : String,in gen : char, in dep : int, in sal : double) +calculatePay() : double +displayEmployee() : void+getFirstName() : String +setFirstName(in name : String) : void +getLastName() : String+setLastName(in name : String) : void +getGender() : char +setGender(in gen : char) : void+getDependents() : int +setDependents(in dep : int) : void +getAnnualSalary() : double+setAnnualSalary(in sal : double) : void +setAnnualSalary(in sal : String) : voidThe following attribute has been added:- static numEmployees: The following behaviors have been added:+ static getNumEmployees( ) : int+ setDependents(in dep : String) : void+ setAnnualSalary(in sal : String) : voidSTEP 2: Create the ProjectYou will want to use the Week 2 project as the starting point for the lab.
    • STEP 3: Modify the EmployeeUsing the UML Diagrams from Step 1, code the changes to the Employee class. Create a staticnumEmployees variable and initialize it to zero. Increment numEmployees by 1 in each of theconstructors. Create an overloaded setDependents method and this time make the parameter astring. Create an overloaded setAnnualSalary method and this time make the parameter a string.Remember that you will have to convert the string in the above two "set" methods to thedata type of the attribute. Make the getNumEmployees a static method. (This way, you can callit with the class name instead of an object name.)Be sure you follow proper commenting and programming styles (indentation, line spacing, etc.).STEP 4: Modify the Main MethodIn the Main class, create code statements that perform the following operations. Be sure youfollow proper commenting and programming styles (header, indentation, line spacing, etc.). Notethat several of the steps below were accomplished in last weeks assignment. New steps arein bold.Create an Employee object using the default constructor. Prompt for and then set the first name,last name, and gender. Consider using your getInput method from Week 1 to obtain data fromthe user for this step as well as Step 3. Prompt for and then set dependents and annual salaryusing the new overloaded setters. Using your code from Week 1, display a divider that containsthe string "Employee Information". Display the Employee Information. Display the number ofemployees created using getNumEmployees. Remember to access getNumEmployees usingthe class name, not the Employee object. Create a second Employee object using the multi-argconstructor, setting each of the attributes with the following values: "Mary", "Noia", F, 5,24000.0 Using your code from Week 1, display a divider that contains the string "EmployeeInformation". Display the employee information for the second Employee object. Display thenumber of employees created using getNumEmployees. Remember to accessgetNumEmployees using the class name, not the Employee object.STEP 5: Compile and TestWhen done, compile and run your code.Then, debug any 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.STEP 6: Screen PrintsCapture the Console output window and paste it into a Word document. The following is asample program output.
    • Screenshot of program that reads: ************** Employee 1 ************** Please enteryour First Name Nana Please enter your Last Name Liu Please enter your Gender Female Pleaseenter your Dependents 2 Please enter your Annual Salary 60000 Employee Information________________________________________ Name: Nana Liu Gender: F Annual Salary:60000.00 Weekly Salary: 1153.85 --- Number of Employee Object Created --- Number ofemployees: 1 ************** Employee 2 ************** Employee Information_______________________________________ Name: Mary Noia Gender: F Dependents: 2Annual Salary: 150000.00 Weekly Salary: 2884.62 --- Number of Employee Object Created ---Number of employees: 2 The end of the CIS247C Week3 iLab. Press any key to continue...STEP 7: Submit DeliverablesCapture the Console output window and paste it into a Word document. Put the zip file andscreen shots (Word document that contains programming code and screen shots of programoutput) in the Dropbox.Submit your lab to the Dropbox located on the silver tab at the top of this page. For instructionson how to use the Dropbox, read these Step-by-Step Instructions or watch this DropboxTutorial.See Syllabus "Due Dates for Assignments & Exams" for due date information.CIS247A iLab 4: Composition and ClassInterfacesGeneral Questions - General General QuestionsiLab 4 of 6: Composition and Class Interfaces/Abstract ClassScenario and SummaryThe objective of the lab is to modify the Employee class to demonstrate composition and a classinterface. An employee typically has benefits, so we will make the following changes:Create a Benefits class. Integrate the Benefit class into the Employee class. Create an iEmployeeabstract class to guarantee that calculatePay is implemented in the Employee class. A tutorial oninterfaces can be downloaded here.Deliverables
    • Due this week:Capture the Console output window and paste it into a Word document. Zip the project folderfiles. Put the zip file and screen shots (Word document that contains programming code andscreen shots of program output) in the Dropbox.iLAB STEPSSTEP 1: Understand the UML DiagramEmployee - firstName : string - lastName : string - gender : char - dependents : int - annualSalary: double - static numEmployees : +benefit : Benefit +Employee() +Employee(in fname : String,in lname : String, in gen : char, in dep : int, in sal : double) +calculatePay() : double+displayEmployee() : void +static getNumEmployees() : int +getFirstName() : string+setFirstName(in name : String) : void +getLastName() : String +setLastName(in name :String) : void +getGender() : char +setGender(in gen : char) : void +getDependents() : int+setDependents(in dep : int) : void +getAnnualSalary() : double +setAnnualSalary(in sal :double) : void +setAnnualSalary(in sal : String) : void <<interface>> Fido : Animal+calculatePay() : double Benefit -healthinsurance : string -lifeinsurance : double -vacation : int+Benefit() +Benefit(in health : string, in life : double, in vacation : int) +displayBenefits() : void+getHealthInsurance() : string +setHealthInsutance(in hins : string) : void +getLifeInsurance() :double +setLifeInsurance(in lifeIns : double) : void +getVacation() : int +setVacation(in vaca :int) : voidThe only change to the Employee class is that there is a new attribute:+benefit : BenefitNotice that there is a "+" for this attribute, meaning that it is public. Make sure to examine themulti-arg constructors signature!Also, the dotted directed line between Employee and iEmployee specifies that the Employeeclass must implement the iEmployee abstract class, and thus provide an implementation for thecalculatePay method.STEP 2: Create the ProjectYou will want to use the Week 3 project as the starting point for the lab. To do this, you willwant to create a new project by following these steps:Create a new project and name it "CIS247C_WK4_Lab_LASTNAME". Copy all the source filesfrom the Week 3 project into the Week 4 project. Before you move on to the next step, build andexecute the Week 4 project.
    • STEP 3: Modify the Employee ClassUsing the UML Diagrams from Step 1, create the Benefit class. To get an idea of how to formatdisplayBenefits, take a look at the output in Step 5. Add a Benefit attribute to the Employeeclass. Initialize the new Benefit attribute in both Employee constructors. Again, take note of themulti-arg constructors parameter list! Create the iEmployee interface (abstract class in C++).Modify the Employee class to implement the new interface so that Employee will have toimplement the calculatePay method.class Employee : public iEmployee6. Modify the Employee class to call displayBenefit when displaying Employee information.STEP 4: Modify the Main MethodNotice that the Employee class now has a public benefit object inside it. This means that you canaccess the set methods of the Benefit object with the following code:<Employee object>.benefit.<method>As an example, to set the lifeInsurance attribute inside an Employee object called emp, we couldexecute the following code:emp.benefit.setLifeInsurance(lifeInsurance);The steps required to modify the Main class are below. New steps are in bold.Create an Employee object using the default constructor. Prompt for and then set the first name,last name, and gender. Consider using your getInput method from Week 1 to obtain data fromthe user for this step as well as Step 3. Prompt for and then set the dependents and annual salaryusing the overloaded setters that accept Strings. Prompt for and set healthInsurance,lifeInsurance, and vacation. Using your code from Week 1, display a divider that contains thestring "Employee Information". Display the Employee Information. Display the number ofemployees created using getNumEmployees(). Remember to access getNumEmployees using theclass name, not the Employee object. Create a Benefit object called benefit1 using the multi-arg construction. Use any information you want for health insurance, life insurance, andvacation. Create another Employee object and use the constructor to fill it with the following:"Mary", "Noia", F, 5, 24000.0, benefit1 Using your code from Week 1, display a divider thatcontains the string "Employee Information". Display the employee information. Display thenumber of employees created using getNumEmployees(). Remember to accessgetNumEmployees using the class name, not the Employee object.STEP 5: Compile and TestWhen done, compile and run your code.
    • Then, debug any 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.STEP 6: Screen PrintsCapture the Console output window and paste it into a Word document. The following is asample screen print.Screenshot of program output that reads: CIS247CWeek4iLab CMD.EXE was started with theabove path as the current directory. UNC paths are not supported. Defaulting to Windowsdirectory. Welcome to your Object Oriented Program--Employee ClassCIS247C, Week 4LabName: Prof.Nana Liu *************** Employee 1 *************** Please enter yourFirst Name Nana Please enter your Last Name Liu Please enter your Gender Female Please enteryour Dependents 2 Please enter your Annual Salary 60000 Please enter your HealthInsuranceCigna Please enter your Life Insurance1.5 Please enter your Vacation Days21Employee Information ________________________________________ Name: Nana LiuGender: F Dependents: 2 Annual Salary: 60000.00 Weekly Salary: 1153.85 Benefit Information________________________________________ Health Insurance: Cigna Life Insurance: 1.50Vacation: 21 days --- Number of Employee Object Created --- Number of employees: 1************** Employee 2 ************** Employee Information_______________________________________ Name: Mary Noia Gender: F Dependents: 2Annual Salary: 150000.00 Weekly Salary: 2884.62 Benefit Information_______________________________________ Health Insurance: North West Mutual LifeInsurance: 5000000.00 Vacation: 14 days --- Number of Employee Object Created --- Number ofemployees: 2 The end of the CIS247C Week4 iLab. Press any key to continue...STEP 7: Submit DeliverablesCapture the Console output window and paste it into a Word document. Put the zip file andscreen shots (Word document that contains programming code and screen shots of programoutput) in the Dropbox.Submit your lab to the Dropbox located on the silver tab at the top of this page. For instructionson how to use the Dropbox, read these Step-by-Step Instructions or watch this DropboxTutorial.See Syllabus "Due Dates for Assignments & Exams" for due date information.CIS247A iLab 5: InheritanceGeneral Questions - General General Questions
    • iLab 5 of 6: InheritanceScenario and SummaryThe objective of the lab is to take the UML Class diagram and enhance last weeks Employeeclass by making the following changes:Create a class called Salaried that is derived from Employee. Create a class called Hourly that isalso derived from Employee. Override the base class calculatePay() method. Override thedisplayEmployee() method.DeliverablesDue this week:Capture the Console output window and paste into a Word document. Zip the project folder file.Put the zip file and screenshots (Word document) in the Dropbox.iLAB STEPSSTEP 1: Understand the UML DiagramNotice the change in UML diagram. It is common practice to leave out the accessors andmutators (getters and setters) from UML class diagrams, since there can be so many of them.Unless otherwise specified, it is assumed that there is an accessor (getter) and a mutator (setter)for every class attribute.Employee #firstName : string #lastName : string #gender : char #dependents : int #annualSalary :double #benefit : Benefit -static numEmployees : +Employee() +Employee(in fname : string, inlname : string, in gen : char, in dep : int, in benefits : Benefit) +static getNumEmployees() : int+CalculatePay() : double +displayEmployee() : void Benefit -healthinsurance : string-lifeinsurance : double -vacation : int +Benefit() +Benefit(in hins : string, in lins : double, in vac :int) +displayBenefits() : void Salaried -MIN_MANAGEMENT_LEVEL :-MAX_MANAGEMENT_LEVEL : -BONUS_PERCENT : -managementLevel : int +Salaried()+Salaried(in fname : string, in lname : string, in gen : char, in dep : int, in sal : double, in ben :Benefit, in manLevel : int) +Salaried(in sal : double, in manLevel : int) +CalculatePay() : double+displayEmployee() : void Hourly -MIN_WAGE : -MAX_WAGE : -MIN_HOURS :-MAX_HOURS: -wage : double -hours : double -category : string +Hourly() +Hourly(in wage :double, in hours : double, in category : string) +Hourly(in fname : string, in lname : string, in gen: char, in dep : int, in wage : double, in hours : double, in ben : Benefit, in category : string)+CalculatePay() : double +displayEmployee() : void
    • STEP 2: Create the ProjectCreate a new project and name it CIS247C_WK5_Lab_LASTNAME. Copy all the source filesfrom the Week 4 project into the Week 5 project.Before you move on to the next step, build and execute the Week 5 project.STEP 3: Modify the Employee ClassUsing the updated Employee class diagram, modify the attributes to be protected. Delete theiEmployee interface class, and remove the reference from the Employee class.STEP 4: Create the Salaried ClassUsing the UML Diagrams from Step 1, create the Salaried classes, ensuring to specify that theSalary class inherits from the Employee class. For each of the constructors listed in the Salariedclass, ensure to invoke the appropriate base class constructor and pass the correct arguments tothe base class constructor. This will initialize the protected attributes and update thenumEmployees counter. The valid management levels are 0, 1, 2, and 3, and should beimplemented as a constant. Override the calculatePay method to add a 10 percent bonus for eachof the management levels (i.e., bonus * .10). The bonus percentage should be implemented as aconstant. Override the displayEmployee() method to add the management level to the employeeinformation.STEP 5: Label TitleUsing the UML Diagrams from Step 1, create the Hourly classes, ensuring to specify that theHourly class inherits from the Employee class. For each of the constructors listed in the Hourlyclass, ensure to invoke the appropriate base class constructor and pass the correct arguments tothe base class constructor. This will initialize the protected attributes and update thenumEmployees counter. The valid category types are "temporary", "part time", and "full time".The provided hours must be more than 0 hours and less than 50 hours, and the limits should beimplemented as constants. The provided wage must be between 10 and 75, and the limits shouldbe implemented as constants. Override the calculatePay method by multiplying the wages by thenumber of hours. Override the Employee setAnnualSalary method and set the annual salary bymultiplying the weekly pay by 50. Override the displayEmployee() method to add the categoryto the hourly employee information.STEP 6: Label TitleUsing previous weeks assignments as an example, create at least one Employee, Hourly, andSalaried employee. For each object created, display the number of employees created. For eachobject created, write statements to exercise each of the public methods listed in the Classdiagram. For each object created, invoke the objects displayEmployee() method to display theemployees information. For employee, the following information needs to be displayed:
    • Partial Sample outputScreenshot of program output that reads: Employee Information________________________________________ Name: Nana Liu Gender: F Annual Salary:60000.00 Weekly Salary: 1153.85 Benefit Information________________________________________ Health Insurance: PPO Life Insurance: 1.50Vacation: 20 days --- Number of Employee Object Created --- Number of employees: 16. For salaried employee, the following information needs to be displayed:Partial Sample outputScreenshot of program output that reads: Name: Jackie Chan Gender: M Dependents: 1 AnnualSalary: 50000.00 Weekly Salary: 1250.00 Benefit Information________________________________________ Health Insurance: HMO Life Insurance:100.00 Vacation: 16 days Salaried Employee Management Level: 3 --- Number of EmployeeObject Created --- Number of employees: 27. For hourly employee, the following information needs to be displayed:Partial Sample outputScreenshot of program output that reads: Name: James Bond Gender: M Dependents: 0 AnnualSalary: 100000.00 Weekly Salary: 2000.00 Benefit Information________________________________________ Health Insurance: PPO Life Insurance: 5.00Vacation: 17 days Hourly Employee Category: Unknown Wage: 40.00 Hours: 50.00 --- Numberof Employee Object Created --- Number of employees: 3STEP 7: Compile and TestWhen done, compile and run your code.Then, debug any 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.Below is the complete sample program output for your reference.Screenshot of program output that reads: ************** Employee 1 ************** Pleaseenter your First Name Nana Please enter your Last Name Liu Please enter your Gender FemalePlease enter your Dependents 2 Please enter your Annual Salary 60000 Please enter yourHealthInsurancePPO Please enter your LifeInsurance1.5 Please enter your Vacation Days20Employee Information ________________________________________ Name: Nana LiuGender: F Annual Salary: 60000.00 Weekly Salary: 1153.85 Benefit Information________________________________________ Health Insurance: PPO Life Insurance: 1.50
    • Vacation: 20 days --- Number of Employee Object Created --- Number of employees: 1************** Employee 2 ************** Please enter your First Name Jackie Please enteryour Last Name Chan Please enter your Gender Male Please enter your Dependents 1 Pleaseenter your HealthInsuranceHMO Please enter your LifeInsurance100 Please enter your VacationDays16 Employee Information ________________________________________ Name: JackieChan Gender: M Dependents: 1 Annual Salary: 50000.00 Weekly Salary: 1250.00 BenefitInformation ________________________________________ Health Insurance: HMO LifeInsurance: 100.00 Vacation: 16 days Salaried Employee Management Level: 3 --- Number ofEmployee Object Created --- Number of employees: 2 *************** Employee 3*************** Please enter your First Name James Please enter your Last Name BondPlease enter your Gender Male Please enter your Dependents 0 Please enter your HealthInsurancePPO Please enter your Life InsurancePPO Please enter your Vacation Days17Employee Information _______________________________________ Name: James BondGender: M Dependents: 0 Annual Salary: 100000.00 Weekly Salary: 2000.00 BenefitInformation ________________________________________ Health Insurance: PPO LifeInsurance: 5.00 Vacation: 17 days Hourly Employee Category: Unknown Wage: 40.00 Hours:50.00 --- Number of Employee Object Created --- Number of employees: 3 The end of theCIS247C Week 5 iLab. Press any key to continue...STEP 8: Label TitleCapture the Console output window and paste into a Word document. Put the zip file andscreenshots (Word document) in the Dropbox.Submit your lab to the Dropbox located on the silver tab at the top of this page. For instructionson how to use the Dropbox, read these Step-by-Step Instructions or watch this DropboxTutorial.See Syllabus "Due Dates for Assignments & Exams" for due date information.CIS247 iLab 6: Abstract ClassesGeneral Questions - General General QuestionsiLab 6 of 7: Abstract Class and PolymorphismScenario and SummaryWe have two separate goals this week:
    • We are going to create an abstract Employee class and two pure virtual functions - calculatePay()and displayEmployee(). The abstract Employee class will prevent a programmer from creatingan object based on Employee, however, a pointer can still be created. Objects based on Salariedand Hourly will be allowed. The pure virtual function calculatePay() in Employee will force thechild classes to implement calculatePay(). The other pure virtual function displayEmployee() inEmployee will force the child classes to implement displayEmployee(). We are going toimplement Polymorphism and dynamic binding in this iLab.DeliverablesDue this week:Capture the Console output window and paste it into a Word document. Zip the project folder inthe Microsoft Visual Studio. Put the zip file and screenshots (word document) in the Dropbox.iLAB STEPSSTEP 1: Understand the UML DiagramNotice in the updated UML diagram that the Employee class is designated as abstract by havingthe class name Employee italicized. Also, the calculatePay method is italicized, which meansthat it is a pure virtual function and needs to be implemented in the derived classes. In addition,make displayEmployee() method a pure virtual function as well.Employee #firstName : string #lastName : string #gender : char #dependents : int #annualSalary :double #benefit : Benefit -static numEmployees : +Employee() +Employee(in fname : string, inlname : string, in gen : char, in dep : int, in benefits : Benefit) +static getNumEmployees() : int+CalculatePay() : double +displayEmployee() : void Benefit -healthinsurance : string-lifeinsurance : double -vacation : int +Benefit() +Benefit(in hins : string, in lins : double, in vac :int) +displayBenefits() : void Salaried -MIN_MANAGEMENT_LEVEL :-MAX_MANAGEMENT_LEVEL : -BONUS_PERCENT : -managementLevel : int +Salaried()+Salaried(in fname : string, in lname : string, in gen : char, in dep : int, in sal : double, in ben :Benefit, in manLevel : int) +Salaried(in sal : double, in manLevel : int) +CalculatePay() : double+displayEmployee() : void Hourly -MIN_WAGE : -MAX_WAGE : -MIN_HOURS :-MAX_HOURS: -wage : double -hours : double -category : string +Hourly() +Hourly(in wage :double, in hours : double, in category : string) +Hourly(in fname : string, in lname : string, in gen: char, in dep : int, in wage : double, in hours : double, in ben : Benefit, in category : string)+CalculatePay() : double +displayEmployee() : voidSTEP 2: Create the ProjectCreate a new project and name it CIS247C_WK6_Lab_LASTNAME. Copy all the source filesfrom the Week 5 project into the Week 6 project.
    • Before you move on to the next step, build and execute the Week 6 project.STEP 3: Modify the Employee ClassDefine calculatePay() as a pure virtual function. Define displayEmployee() as a pure virtualfunction. When class Employee contains two pure virtual functions, it becomes an abstract class.STEP 4: Create Generalized Input MethodsReuse method getInput() from the previous iLab to prompt the user to enter Employeeinformation.STEP 5: Modify the Main MethodCreate two employee pointers with:Employee * Salaried(10000,3); Employee * Hourly(50, 40, "full time");The first employee pointer refers to a salaried employee and the second employee pointer refersto a hourly employee.Prompt the user to enter information for these two pointers and display the calculated result.For salaried employee, the following information needs to be displayed:Partial Sample Output:Screenshot of program output that reads: Employee Information________________________________________ Name: Nana Liu Gender: F Annual Salary:60000.00 Weekly Salary: 1500.00 Benefit Information________________________________________ Health Insurance: PPO Life Insurance: 1.50Vacation: 21 days Salaried Employee Management level: 3For hourly employee, the following information needs to be displayed:Partial Sample Output:Screenshot of program output that reads: Name: Jackie Chan Gender: M Dependents: 1 AnnualSalary: 100000.00 Weekly Salary: 2000.00 Benefit Information________________________________________ Health Insurance: HMO Life Insurance:100.00 Vacation: 18 days Hourly Employee Category: full time Wage: 50.00 Hours: 40.00STEP 6: Compile and TestWhen done, compile and run your code.
    • Then, debug any 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.Below is a complete sample program output for your reference.Screenshot of program output that reads: Welcome to your Object Oriented Program--EmployeeClassCIS247C, Week 6 LabName: Prof.Nana Liu ************** Employee 1************** Please enter your First Name :Nana Please enter your Last Name :Liu Pleaseenter your Gender :Female Please enter your Dependents :2 Please enter your Annual Salary :60000 Please enter your HealthInsurance:PPO Please enter your LifeInsurance:1.5 Please enteryour Vacation Days:21 Employee Information ________________________________________Name: Nana Liu Gender: F Dependents: 2 Annual Salary: 60000.00 Weekly Salary: 1500.00Benefit Information ________________________________________ Health Insurance: PPOLife Insurance: 1.50 Vacation: 21 days Salaried Employee Management level: 3************** Employee 2 ************** Please enter your First Name :Jackie Pleaseenter your Last Name :Chan Please enter your Gender :Male Please enter your Dependents :1Please enter your HealthInsurance:HMO Please enter your LifeInsurance:100 Please enter yourVacation Days:18 Employee Information ________________________________________Name: Jackie Chan Gender: M Dependents: 1 Annual Salary: 100000.00 Weekly Salary:2000.00 Benefit Information ________________________________________ HealthInsurance: HMO Life Insurance: 100.00 Vacation: 18 days Category: full time Wage: 50.00Hours: 40.00 --- Number of Employee Object Created --- Number of employees: 2 The end ofthe CIS247C Week6 iLab. Press any key to continue...STEP 7: Submit DeliverablesSubmit your lab to the Dropbox located on the silver tab at the top of this page. For instructionson how to use the Dropbox, read these Step-by-Step Instructions or watch this DropboxTutorial.See Syllabus "Due Dates for Assignments & Exams" for due date informationCIS247 iLab 7 of 7: Putting It All TogetherGeneral Questions - General General QuestionsiLab 7 of 7: Code Management and ModularityScenario and Summary
    • This week, we learn how to manage complexity by putting together a ready-built application thatcomprises a number of separate header and source files. Our job here will be to take theseindividual files and combine them into one standalone application. Although the process is quitea simple one, it will emphasize the advantage of modularity when writing code. It also showshow code can be reused between programmers and/or applications.DeliverablesDue this week:Capture the Console output window and paste it into a Word document. Zip the project folder inMicrosoft Visual Studio. Put the zip file and screen shots (Word document) in the Dropbox.iLAB STEPSOverviewPreparation:Download the Lab_7_files.zip.STEP 1: Create the Project1. Create a new C++ console-based project.STEP 2: Add Files to Your Project1. Unzip the source code and header files found in Doc Sharing (Lab_7_files.zip), and then addthese files to your project as needed.STEP 3: Build and TestBuild your project (compile your program). Eliminate all syntax errors. Run the program.STEP 4: Label Title1. Capture a screen print of your output [Do a PRINT SCREEN and paste into an MS Worddocument.]This is a sample program output:
    • Screenshot of program output that reads: *** Welcome to Shellys Candy Shop *** To select anitem, enter 1 for Candy 2 for Chips 3 for Gum 4 for Cookies 9 to exit 4 Please deposit 85 cents25 Please deposit another 60 cents 60 Collect your item at the bottom and enjoy. *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* *** Welcome to Shellys Candy Shop *** To select an item, enter 1 forCandy 2 for Chips 3 for Gum 4 for Cookies 9 to exit 2 Please deposit 85 cents 65 *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* *** Welcome to Shellys Candy Shop *** To select an item, enter 1 forCandy 2 for Chips 3 for Gum 4 for Cookies 9 to exit 9 Press any key to continue...Zip your project files. Submit the Word document with screen print and zip file to the Dropbox.STEP 5: Submit DeliverablesSubmit your lab to the Dropbox located on the silver tab at the top of this page. For instructionson how to use the Dropbox, read these Step-by-Step Instructions or watch this DropboxTutorial.See Syllabus "Due Dates for Assignments & Exams" for due date information