SlideShare a Scribd company logo
1 of 4
CIS247A iLab 2 of 7 Employee Class

Click this link to get the tutorial:
http://homeworkfox.com/tutorials/general-
questions/4461/cis247a-ilab-2-of-7-employee-
class/
Week 2: Object Construction and Data Abstraction - iLab

                                                                                                       Print This



                                                                                                           Page



iLab 2 of 6: Employee Class



                                         Connect to the iLab here.


         Submit your assignment to the Dropbox located on the silver tab at the
         top of this page.

         (See Syllabus "Due Dates for Assignments & Exams" for due dates.)




 iLAB OVERVIE
 W
Scenario and Summary

We begin our investigation of object-oriented programming by creating an object-oriented program 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 for this class must satisfy the
requirements in Steps 1 through 3. After you create the objects, you will 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 extend this class in
Labs 3 through 6.

Deliverables
Due this week:

    •    Capture the Console output window and paste it into a Word document.
    •    Zip the project folder files.

    •    Put the zip file and screen shots (Word document that contains programming code and screen
         shots of program output) in the Dropbox.

 iLAB STEP
 S
STEP 1: Understand the UML Class Diagram

Use the following UML diagram to build the class. The first section specifies the attributes. The second
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, in salary : 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 Class
   1. Create a new project called "CIS247B_Week2Lab_YourName".
   2. Using the provided Class Diagram from Step 1, code the Employee class in the new project (i.e.,
      "Realize the UML Class diagrams").

    3. The default constructor should set the attributes as follows: firstName = "not given", lastName =
       "not given", gender = "U" (for unknown), dependents = 0, and annualSalary = 20,000.

    4. The multi-arg constructor should initialize all of the attributes using values passed in using its
       parameter list.

    5. As shown in the Class diagram, each attribute should have a "getter" to retrieve the stored
       attribute value, and a "setter" that modifies the value.

    6. The calculatePay( ) method of the Employee class should return the value of annual salary
       divided by 52 (return annualSalary / 52;).

    7. The displayEmployee() method should display all the attributes of the Employee object in a well-
       formatted string with logical labels applied to each attribute. Don't forget to call calculatePay from
       within the displayEmployee method in order to display the Employee's weekly pay as well!


STEP 3: Code the Main Program

In the Main class, create code statements that perform the following operations. Be sure you follow
proper commenting and programming styles (header, indentation, line spacing, etc.).

    1. Create an Employee object using the default constructor.
2. Prompt for and then set the first name, last name, gender, dependents, and annual
         salary. (Remember that you have to convert gender, dependents, and annual salary from
         strings to the appropriate data type.)

    3. Using your code from last week, display a divider that contains the string "Employee Information"

    4. Format the currency using the following formatting services:



         cout<<"Annual Salary:t" << setprecision(2)<<showpoint<<fixed<<annualSalary << "n";

    5. Display the Employee information.
    6. Create a second Employee object using the multi-argument constructor, setting each of the
       attributes with appropriate valid values.

    7. Using your code from last week, display a divider that contains the string "Employee Information".

    8. Display the Employee information for the second Employee object.


STEP 4: Compile and Test

When 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 Prints

Capture the Console output window and paste into a Word document. The following is a sample screen.




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 Please enter your Gender Female Please enter your Dependents 2 Please enter your Annual Salary
60000 Employee Information ___________________________________________ Name: Nana Liu Gender: F
Dependents: 2 Annual Salary: 60000.00 Weekly Salary 1153.85 *************** Employee 2 *************** Name: Mary Noia
Gender: F Dependents: 2 Annual Salary: 150000.00 Weekly Salary: 2884.62 The end of the CIS247C Week 1 iLab. Press
any key to continue...
STEP 6: Submit Deliverables
    •    Capture the Console output window and paste into a Word document.
    •    Put the zip file and screen shots (Word document that contains programming code and screen
         shots of program output) in the Dropbox.

Submit your lab to the Dropbox located on the silver tab at the top of this page. For instructions on how to
use the Dropbox, read these Step-by-Step Instructions or watch this          Dropbox Tutorial.
See Syllabus "Due Dates for Assignments & Exams" for due date information.

More Related Content

What's hot

MVC Design Pattern in JavaScript by ADMEC Multimedia Institute
MVC Design Pattern in JavaScript by ADMEC Multimedia InstituteMVC Design Pattern in JavaScript by ADMEC Multimedia Institute
MVC Design Pattern in JavaScript by ADMEC Multimedia InstituteRavi Bhadauria
 
ASP.NET Core MVC with EF Core code first
ASP.NET Core MVC with EF Core code firstASP.NET Core MVC with EF Core code first
ASP.NET Core MVC with EF Core code firstMd. Aftab Uddin Kajal
 
Cis247 a ilab 5 inheritance
Cis247 a ilab 5 inheritanceCis247 a ilab 5 inheritance
Cis247 a ilab 5 inheritancecis247
 

What's hot (6)

MVC Design Pattern in JavaScript by ADMEC Multimedia Institute
MVC Design Pattern in JavaScript by ADMEC Multimedia InstituteMVC Design Pattern in JavaScript by ADMEC Multimedia Institute
MVC Design Pattern in JavaScript by ADMEC Multimedia Institute
 
ASP.NET Core MVC with EF Core code first
ASP.NET Core MVC with EF Core code firstASP.NET Core MVC with EF Core code first
ASP.NET Core MVC with EF Core code first
 
Cis247 a ilab 5 inheritance
Cis247 a ilab 5 inheritanceCis247 a ilab 5 inheritance
Cis247 a ilab 5 inheritance
 
Ch 5 Presentation
Ch 5 PresentationCh 5 Presentation
Ch 5 Presentation
 
Ch 5 Presentation
Ch 5 PresentationCh 5 Presentation
Ch 5 Presentation
 
Java script
Java scriptJava script
Java script
 

Viewers also liked

Cis247 i lab 6 abstract classes
Cis247 i lab 6 abstract classesCis247 i lab 6 abstract classes
Cis247 i lab 6 abstract classescis247
 
Cis247 i lab 7 of 7 putting it all together
Cis247 i lab 7 of 7 putting it all togetherCis247 i lab 7 of 7 putting it all together
Cis247 i lab 7 of 7 putting it all togethercis247
 
Cis247 a ilab 4 composition and class interfaces
Cis247 a ilab 4 composition and class interfacesCis247 a ilab 4 composition and class interfaces
Cis247 a ilab 4 composition and class interfacescis247
 
Cis247 a ilab 1 of 7 creating a user interface
Cis247 a ilab 1 of 7 creating a user interfaceCis247 a ilab 1 of 7 creating a user interface
Cis247 a ilab 1 of 7 creating a user interfacecis247
 
Herathera island resort 2012(new)
Herathera island resort 2012(new)Herathera island resort 2012(new)
Herathera island resort 2012(new)ScaevolaTravel
 
Productivity
ProductivityProductivity
Productivitybappykazi
 
Compensation presentation
Compensation presentation Compensation presentation
Compensation presentation bappykazi
 
Chinese Culture
Chinese Culture Chinese Culture
Chinese Culture bappykazi
 
Six thinkinghats
Six thinkinghatsSix thinkinghats
Six thinkinghatsbappykazi
 
Import subtitution industrialization
Import subtitution industrializationImport subtitution industrialization
Import subtitution industrializationbappykazi
 
Report on Import substitution industrialization
Report on Import substitution industrializationReport on Import substitution industrialization
Report on Import substitution industrializationbappykazi
 
Marketing mix Analysis
Marketing mix AnalysisMarketing mix Analysis
Marketing mix Analysisbappykazi
 

Viewers also liked (17)

Cis247 i lab 6 abstract classes
Cis247 i lab 6 abstract classesCis247 i lab 6 abstract classes
Cis247 i lab 6 abstract classes
 
Cis247 i lab 7 of 7 putting it all together
Cis247 i lab 7 of 7 putting it all togetherCis247 i lab 7 of 7 putting it all together
Cis247 i lab 7 of 7 putting it all together
 
Cis247 a ilab 4 composition and class interfaces
Cis247 a ilab 4 composition and class interfacesCis247 a ilab 4 composition and class interfaces
Cis247 a ilab 4 composition and class interfaces
 
Cis247 a ilab 1 of 7 creating a user interface
Cis247 a ilab 1 of 7 creating a user interfaceCis247 a ilab 1 of 7 creating a user interface
Cis247 a ilab 1 of 7 creating a user interface
 
My childhood
My childhoodMy childhood
My childhood
 
Herathera island resort 2012(new)
Herathera island resort 2012(new)Herathera island resort 2012(new)
Herathera island resort 2012(new)
 
Capitulo i arquitectura pc
Capitulo i arquitectura pcCapitulo i arquitectura pc
Capitulo i arquitectura pc
 
Conceptos basicos del algebra
Conceptos basicos del algebraConceptos basicos del algebra
Conceptos basicos del algebra
 
WILLIAM A. SCHNEIDER - Pintor
WILLIAM A. SCHNEIDER - PintorWILLIAM A. SCHNEIDER - Pintor
WILLIAM A. SCHNEIDER - Pintor
 
Untitled Presentation
Untitled PresentationUntitled Presentation
Untitled Presentation
 
Productivity
ProductivityProductivity
Productivity
 
Compensation presentation
Compensation presentation Compensation presentation
Compensation presentation
 
Chinese Culture
Chinese Culture Chinese Culture
Chinese Culture
 
Six thinkinghats
Six thinkinghatsSix thinkinghats
Six thinkinghats
 
Import subtitution industrialization
Import subtitution industrializationImport subtitution industrialization
Import subtitution industrialization
 
Report on Import substitution industrialization
Report on Import substitution industrializationReport on Import substitution industrialization
Report on Import substitution industrialization
 
Marketing mix Analysis
Marketing mix AnalysisMarketing mix Analysis
Marketing mix Analysis
 

Similar to Cis247 a ilab 2 of 7 employee class

Cis247 a ilab 3 overloaded methods and static methods variables
Cis247 a ilab 3 overloaded methods and static methods variablesCis247 a ilab 3 overloaded methods and static methods variables
Cis247 a ilab 3 overloaded methods and static methods variablesccis224477
 
Cis247 i lab 3 overloaded methods and static methods variables
Cis247 i lab 3 overloaded methods and static methods variablesCis247 i lab 3 overloaded methods and static methods variables
Cis247 i lab 3 overloaded methods and static methods variablessdjdskjd9097
 
Cis247 a ilab 4 composition and class interfaces
Cis247 a ilab 4 composition and class interfacesCis247 a ilab 4 composition and class interfaces
Cis247 a ilab 4 composition and class interfacesccis224477
 
Cis247 a ilab 4 composition and class interfaces
Cis247 a ilab 4 composition and class interfacesCis247 a ilab 4 composition and class interfaces
Cis247 a ilab 4 composition and class interfacesccis224477
 
Cis247 i lab 4 composition and class interfaces
Cis247 i lab 4 composition and class interfacesCis247 i lab 4 composition and class interfaces
Cis247 i lab 4 composition and class interfacessdjdskjd9097
 
Cis247 i lab 6 abstract classes
Cis247 i lab 6 abstract classesCis247 i lab 6 abstract classes
Cis247 i lab 6 abstract classessdjdskjd9097
 
Cis247 i lab 6 abstract classes
Cis247 i lab 6 abstract classesCis247 i lab 6 abstract classes
Cis247 i lab 6 abstract classesccis224477
 
Cis247 a ilab 5 inheritance
Cis247 a ilab 5 inheritanceCis247 a ilab 5 inheritance
Cis247 a ilab 5 inheritanceccis224477
 
Cis247 i lab 5 inheritance
Cis247 i lab 5 inheritanceCis247 i lab 5 inheritance
Cis247 i lab 5 inheritancesdjdskjd9097
 
33.docxSTEP 1 Understand the UML Diagram Analyze and under.docx
33.docxSTEP 1 Understand the UML Diagram Analyze and under.docx33.docxSTEP 1 Understand the UML Diagram Analyze and under.docx
33.docxSTEP 1 Understand the UML Diagram Analyze and under.docxgilbertkpeters11344
 
Please be advised that there are four (4) programs just like this on.docx
Please be advised that there are four (4) programs just like this on.docxPlease be advised that there are four (4) programs just like this on.docx
Please be advised that there are four (4) programs just like this on.docxlorindajamieson
 
Assignment Instructions 2_7aExplain the interrelationships bet.docx
Assignment Instructions 2_7aExplain the interrelationships bet.docxAssignment Instructions 2_7aExplain the interrelationships bet.docx
Assignment Instructions 2_7aExplain the interrelationships bet.docxssuser562afc1
 
Mark Jackson\'s Portfoilo
Mark Jackson\'s PortfoiloMark Jackson\'s Portfoilo
Mark Jackson\'s PortfoiloMark_Jackson
 
While writing program in any language, you need to use various variables to s...
While writing program in any language, you need to use various variables to s...While writing program in any language, you need to use various variables to s...
While writing program in any language, you need to use various variables to s...bhargavi804095
 
Comp 220 ilab 7 of 7
Comp 220 ilab 7 of 7Comp 220 ilab 7 of 7
Comp 220 ilab 7 of 7solutionjug4
 
SE-IT JAVA LAB SYLLABUS
SE-IT JAVA LAB SYLLABUSSE-IT JAVA LAB SYLLABUS
SE-IT JAVA LAB SYLLABUSnikshaikh786
 
Comp 220 ilab 6 of 7
Comp 220 ilab 6 of 7Comp 220 ilab 6 of 7
Comp 220 ilab 6 of 7ashhadiqbal
 
Comp 220 ilab 7 of 7
Comp 220 ilab 7 of 7Comp 220 ilab 7 of 7
Comp 220 ilab 7 of 7helpido6
 

Similar to Cis247 a ilab 2 of 7 employee class (20)

Cis247 a ilab 3 overloaded methods and static methods variables
Cis247 a ilab 3 overloaded methods and static methods variablesCis247 a ilab 3 overloaded methods and static methods variables
Cis247 a ilab 3 overloaded methods and static methods variables
 
Cis247 i lab 3 overloaded methods and static methods variables
Cis247 i lab 3 overloaded methods and static methods variablesCis247 i lab 3 overloaded methods and static methods variables
Cis247 i lab 3 overloaded methods and static methods variables
 
Cis247 a ilab 4 composition and class interfaces
Cis247 a ilab 4 composition and class interfacesCis247 a ilab 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 interfacesCis247 a ilab 4 composition and class interfaces
Cis247 a ilab 4 composition and class interfaces
 
Cis247 i lab 4 composition and class interfaces
Cis247 i lab 4 composition and class interfacesCis247 i lab 4 composition and class interfaces
Cis247 i lab 4 composition and class interfaces
 
Cis247 i lab 6 abstract classes
Cis247 i lab 6 abstract classesCis247 i lab 6 abstract classes
Cis247 i lab 6 abstract classes
 
Cis247 i lab 6 abstract classes
Cis247 i lab 6 abstract classesCis247 i lab 6 abstract classes
Cis247 i lab 6 abstract classes
 
Cis247 a ilab 5 inheritance
Cis247 a ilab 5 inheritanceCis247 a ilab 5 inheritance
Cis247 a ilab 5 inheritance
 
Cis247 i lab 5 inheritance
Cis247 i lab 5 inheritanceCis247 i lab 5 inheritance
Cis247 i lab 5 inheritance
 
33.docxSTEP 1 Understand the UML Diagram Analyze and under.docx
33.docxSTEP 1 Understand the UML Diagram Analyze and under.docx33.docxSTEP 1 Understand the UML Diagram Analyze and under.docx
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
Please be advised that there are four (4) programs just like this on.docxPlease be advised that there are four (4) programs just like this on.docx
Please be advised that there are four (4) programs just like this on.docx
 
Assignment Instructions 2_7aExplain the interrelationships bet.docx
Assignment Instructions 2_7aExplain the interrelationships bet.docxAssignment Instructions 2_7aExplain the interrelationships bet.docx
Assignment Instructions 2_7aExplain the interrelationships bet.docx
 
02 objective-c session 2
02  objective-c session 202  objective-c session 2
02 objective-c session 2
 
Mark Jackson\'s Portfoilo
Mark Jackson\'s PortfoiloMark Jackson\'s Portfoilo
Mark Jackson\'s Portfoilo
 
While writing program in any language, you need to use various variables to s...
While writing program in any language, you need to use various variables to s...While writing program in any language, you need to use various variables to s...
While writing program in any language, you need to use various variables to s...
 
11-Classes.ppt
11-Classes.ppt11-Classes.ppt
11-Classes.ppt
 
Comp 220 ilab 7 of 7
Comp 220 ilab 7 of 7Comp 220 ilab 7 of 7
Comp 220 ilab 7 of 7
 
SE-IT JAVA LAB SYLLABUS
SE-IT JAVA LAB SYLLABUSSE-IT JAVA LAB SYLLABUS
SE-IT JAVA LAB SYLLABUS
 
Comp 220 ilab 6 of 7
Comp 220 ilab 6 of 7Comp 220 ilab 6 of 7
Comp 220 ilab 6 of 7
 
Comp 220 ilab 7 of 7
Comp 220 ilab 7 of 7Comp 220 ilab 7 of 7
Comp 220 ilab 7 of 7
 

Recently uploaded

Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 

Recently uploaded (20)

Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 

Cis247 a ilab 2 of 7 employee class

  • 1. CIS247A iLab 2 of 7 Employee Class Click this link to get the tutorial: http://homeworkfox.com/tutorials/general- questions/4461/cis247a-ilab-2-of-7-employee- class/ Week 2: Object Construction and Data Abstraction - iLab Print This Page iLab 2 of 6: Employee Class Connect to the iLab here. Submit your assignment to the Dropbox located on the silver tab at the top of this page. (See Syllabus "Due Dates for Assignments & Exams" for due dates.) iLAB OVERVIE W Scenario and Summary We begin our investigation of object-oriented programming by creating an object-oriented program 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 for this class must satisfy the requirements in Steps 1 through 3. After you create the objects, you will 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 extend this class in Labs 3 through 6. Deliverables
  • 2. Due this week: • Capture the Console output window and paste it into a Word document. • Zip the project folder files. • Put the zip file and screen shots (Word document that contains programming code and screen shots of program output) in the Dropbox. iLAB STEP S STEP 1: Understand the UML Class Diagram Use the following UML diagram to build the class. The first section specifies the attributes. The second 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, in salary : 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 Class 1. Create a new project called "CIS247B_Week2Lab_YourName". 2. Using the provided Class Diagram from Step 1, code the Employee class in the new project (i.e., "Realize the UML Class diagrams"). 3. The default constructor should set the attributes as follows: firstName = "not given", lastName = "not given", gender = "U" (for unknown), dependents = 0, and annualSalary = 20,000. 4. The multi-arg constructor should initialize all of the attributes using values passed in using its parameter list. 5. As shown in the Class diagram, each attribute should have a "getter" to retrieve the stored attribute value, and a "setter" that modifies the value. 6. The calculatePay( ) method of the Employee class should return the value of annual salary divided by 52 (return annualSalary / 52;). 7. The displayEmployee() method should display all the attributes of the Employee object in a well- formatted string with logical labels applied to each attribute. Don't forget to call calculatePay from within the displayEmployee method in order to display the Employee's weekly pay as well! STEP 3: Code the Main Program In the Main class, create code statements that perform the following operations. Be sure you follow proper commenting and programming styles (header, indentation, line spacing, etc.). 1. Create an Employee object using the default constructor.
  • 3. 2. Prompt for and then set the first name, last name, gender, dependents, and annual salary. (Remember that you have to convert gender, dependents, and annual salary from strings to the appropriate data type.) 3. Using your code from last week, display a divider that contains the string "Employee Information" 4. Format the currency using the following formatting services: cout<<"Annual Salary:t" << setprecision(2)<<showpoint<<fixed<<annualSalary << "n"; 5. Display the Employee information. 6. Create a second Employee object using the multi-argument constructor, setting each of the attributes with appropriate valid values. 7. Using your code from last week, display a divider that contains the string "Employee Information". 8. Display the Employee information for the second Employee object. STEP 4: Compile and Test When 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 Prints Capture the Console output window and paste into a Word document. The following is a sample screen. 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 Please enter your Gender Female Please enter your Dependents 2 Please enter your Annual Salary 60000 Employee Information ___________________________________________ Name: Nana Liu Gender: F Dependents: 2 Annual Salary: 60000.00 Weekly Salary 1153.85 *************** Employee 2 *************** Name: Mary Noia Gender: F Dependents: 2 Annual Salary: 150000.00 Weekly Salary: 2884.62 The end of the CIS247C Week 1 iLab. Press any key to continue... STEP 6: Submit Deliverables • Capture the Console output window and paste into a Word document. • Put the zip file and screen shots (Word document that contains programming code and screen shots of program output) in the Dropbox. Submit your lab to the Dropbox located on the silver tab at the top of this page. For instructions on how to use the Dropbox, read these Step-by-Step Instructions or watch this Dropbox Tutorial.
  • 4. See Syllabus "Due Dates for Assignments & Exams" for due date information.