Cis 247 Week 3

In: Computers and Technology

Submitted By alexmicane4
Words 1425
Pages 6
HELPIDO.COM

---------------------------------------------------------------

FOLLOW THE LINK TO GET THE TUTORIAL

http://helpido.com/cis-247-week-3/

---------------------------------------------------------------

CIS 247 WEEK 3
________________________________________
Week 3: Classes and Encapsulation – iLab iLab 3 of 7: Overloaded Methods and Static Methods / Variables i L A B O V E R V I E W Scenario and Summary
The objective of the lab is to take the UML Class diagram and enhance last week’s Employee class by making the following changes:
1. Create a static variable called numEmployees that holds an int and initialize it to zero. This will allow us to count all the Employee objects created in the main class.
2. Increment numEmployees in all of the constructors.
3. Add an overloaded method of CalculatePay that will accept a new, or modifed, annual salary value. We will then have two versions of the CalculatePay method (1) that uses the current value of the annual salary for the calculation and (2) one that updates the annual salary with a new value before the calculation.
4. Using properties add accessor (get) and mutator (set) methods to access each of the private attributes and to validate the attribute values before they are set. i L A B S T E P S Understand the UML Diagram
Analyze and understand the object UML diagram, which models the structure of the program.
 There are no design changes to the Presentation Tier from the previous project and InputUtilities and ApplicationsUtilities classes are used without modification (except for changing the Application Information).
 The default values for each of the attributres have been declared as a constants, which is indicated by the ALL_CAPS in the name, and the attributes are then set using the default values
 Each of the attributes have been specified…...

Similar Documents

Cis 247 Week 3

...HELPIDO.COM --------------------------------------------------------------- FOLLOW THE LINK TO GET THE TUTORIAL http://helpido.com/cis-247-week-3/ --------------------------------------------------------------- CIS 247 WEEK 3 ________________________________________ Week 3: Classes and Encapsulation – iLab iLab 3 of 7: Overloaded Methods and Static Methods / Variables i L A B O V E R V I E W Scenario and Summary The objective of the lab is to take the UML Class diagram and enhance last week’s Employee class by making the following changes: 1. Create a static variable called numEmployees that holds an int and initialize it to zero. This will allow us to count all the Employee objects created in the main class. 2. Increment numEmployees in all of the constructors. 3. Add an overloaded method of CalculatePay that will accept a new, or modifed, annual salary value. We will then have two versions of the CalculatePay method (1) that uses the current value of the annual salary for the calculation and (2) one that updates the annual salary with a new value before the calculation. 4. Using properties add accessor (get) and mutator (set) methods to access each of the private attributes and to validate the attribute values before they are set. i L A B S T E P S Understand the UML Diagram Analyze and understand the object UML diagram, which models the structure of the program.  There are no design changes to the Presentation......

Words: 1425 - Pages: 6

Cis 247 Week 5

...HELPIDO.COM --------------------------------------------------------------- FOLLOW THE LINK TO GET THE TUTORIAL http://helpido.com/cis-247-week-5/#5 --------------------------------------------------------------- CIS 247 WEEK 5 ________________________________________ Week 5: Composition, Inheritance, and Polymorphism – iLab iLab 5 of 7: Inheritance i L A B O V E R V I E W Scenario and Summary The objective of the lab is to take the UML Class diagram and enhance last week’s Employee class by making the following changes: 1. Create a derived class called Salaried that is derived from Employee. 2. Create a derived class called Hourly that is derived from Employee. 3. Create generalized input methods that accept any type of Employee or derived Employee object 4. Create generalized output methods that accept any type of Employee or derived Employee object 5. Override the base class CalculatePay method 6. Override one of the base class CalculateWeeklyPay methods i L A B S T E P S STEP 1: Understand the UML Diagram Analyze and understand the object UML diagram, which models the structure of the program.  There are two new Employee derived classes (1) Salaried and (2) Hourly that are derived from the Employee class.  The Employee class contains a new attribute employeeType and a new constructor that accepts as an argument the assigned employee type.  Both the Salaried and the Hourly classes override only the......

Words: 1515 - Pages: 7

Cis 247 Week 6

...HELPIDO.COM ------------------------------------------------------------------ FOLLOW THE LINK TO GET THE TUTORIAL http://helpido.com/cis-247-week-6/#5 ------------------------------------------------------------------ CIS 247 WEEK 6 ________________________________________ Week 6: Interfaces and Abstract Classes – iLab iLab 6 of 7: Abstract Classes i L A B O V E R V I E W Scenario and Summary The objective of the lab is to take the UML Class diagram and enhance last week’s Employee class by making the following changes: 1. Convert the Employee class to an abstract class 2. Add an abstract method called CalculateNetPay to the Employee class 3. In both the Salaried and Hourly classes implement the CalculateNetPay method Deliverables Due this week:  Before you post your lab in the dropbox, copy your entire program into a Notepad file and post that. I do not need you to zip the project or give me screen shots of the output. i L A B S T E P S STEP 1: Understand the UML Diagram Analyze and understand the object UML diagram, which models the structure of the program.  The Employee class has been specifed as abstract, which is denoted by the name of the class being italized Employee  The Employee class as a new method CalculateNetPay which is an abstract method, denoted by the italized name of the method. Since this method is an abstract method the CalculateNetPay method WILL NOT have an implementation in the Employee......

Words: 686 - Pages: 3

Cis 247 Week 6

...HELPIDO.COM ------------------------------------------------------------------ FOLLOW THE LINK TO GET THE TUTORIAL http://helpido.com/cis-247-week-6/#5 ------------------------------------------------------------------ CIS 247 WEEK 6 ________________________________________ Week 6: Interfaces and Abstract Classes – iLab iLab 6 of 7: Abstract Classes i L A B O V E R V I E W Scenario and Summary The objective of the lab is to take the UML Class diagram and enhance last week’s Employee class by making the following changes: 1. Convert the Employee class to an abstract class 2. Add an abstract method called CalculateNetPay to the Employee class 3. In both the Salaried and Hourly classes implement the CalculateNetPay method Deliverables Due this week:  Before you post your lab in the dropbox, copy your entire program into a Notepad file and post that. I do not need you to zip the project or give me screen shots of the output. i L A B S T E P S STEP 1: Understand the UML Diagram Analyze and understand the object UML diagram, which models the structure of the program.  The Employee class has been specifed as abstract, which is denoted by the name of the class being italized Employee  The Employee class as a new method CalculateNetPay which is an abstract method, denoted by the italized name of the method. Since this method is an abstract method the CalculateNetPay method WILL NOT have an implementation in the Employee......

Words: 686 - Pages: 3

Cis 247 Week 7

...HELPIDO.COM ------------------------------------------------------------------ FOLLOW THE LINK TO GET THE TUTORIAL http://helpido.com/cis-247-week-7/#5 ------------------------------------------------------------------ CIS 247 WEEK 7 ________________________________________ Week 7: Program Construction – iLab iLab 7 of 7: Putting It All Together i L A B O V E R V I E W Scenario and Summary This week, you will be implementing inheritance by creating a generic Racer base class along with two derived classes called StreetTuner and HotRod. You will make the Racer class abstract and include the abstract method IsDead() in the Racer class. Deliverables Due this week:  Capture the console output window and paste it into a Word Document;  Zip the project folder; and  Put the zip file and screenshots (Word document) in the Dropbox. i L A B S T E P S STEP 1: Understand the UML Diagram STEP 2: Build the Inheritance Hierarchy 1. Create a project called “CIS247_WK7_Lab_LASTNAME”. 2. Build the class structure shown in the UML diagram. Remember to include properties for each class attribute. STEP 3: Implement the Logic for the HotRod Class 1. Provide suitable logic for the ToString method. As always, the ToString method should reveal the state of an object. 2. For the IsDead() method in HotRod, use the logic to implement the base class abstract IsDead method. Hint: To generate a random number, use the following code, which......

Words: 675 - Pages: 3

Cis 247 Week 7

...HELPIDO.COM ------------------------------------------------------------------ FOLLOW THE LINK TO GET THE TUTORIAL http://helpido.com/cis-247-week-7/#5 ------------------------------------------------------------------ CIS 247 WEEK 7 ________________________________________ Week 7: Program Construction – iLab iLab 7 of 7: Putting It All Together i L A B O V E R V I E W Scenario and Summary This week, you will be implementing inheritance by creating a generic Racer base class along with two derived classes called StreetTuner and HotRod. You will make the Racer class abstract and include the abstract method IsDead() in the Racer class. Deliverables Due this week:  Capture the console output window and paste it into a Word Document;  Zip the project folder; and  Put the zip file and screenshots (Word document) in the Dropbox. i L A B S T E P S STEP 1: Understand the UML Diagram STEP 2: Build the Inheritance Hierarchy 1. Create a project called “CIS247_WK7_Lab_LASTNAME”. 2. Build the class structure shown in the UML diagram. Remember to include properties for each class attribute. STEP 3: Implement the Logic for the HotRod Class 1. Provide suitable logic for the ToString method. As always, the ToString method should reveal the state of an object. 2. For the IsDead() method in HotRod, use the logic to implement the base class abstract IsDead method. Hint: To generate a random number, use the following code, which......

Words: 675 - Pages: 3

Cis 247 Week 2

...HELPIDO.COM --------------------------------------------------------------- FOLLOW THE LINK TO GET THE TUTORIAL http://helpido.com/cis-247-week-2/#5 --------------------------------------------------------------- CIS 247 WEEK 2 ________________________________________ Week 2: Object Construction and Data Abstraction – iLab iLab 2 of 7: Employee Class i L A B O V E R V I E 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 into a Word Document.  Zip the project folder.  Put the zip file and screen shots (Word document) in the Dropbox. i L A B S T E P S STEP 1: Understand the UML Class Diagram Analyze and understand the object UML diagram, which models the structure of the program. The first section specifies the attributes. The second section specifies the operations, and the first character specifies the access......

Words: 1704 - Pages: 7

Cis 247 Week 3

...HELPIDO.COM --------------------------------------------------------------- FOLLOW THE LINK TO GET THE TUTORIAL http://helpido.com/cis-247-week-3/ --------------------------------------------------------------- CIS 247 WEEK 3 ________________________________________ Week 3: Classes and Encapsulation – iLab iLab 3 of 7: Overloaded Methods and Static Methods / Variables i L A B O V E R V I E W Scenario and Summary The objective of the lab is to take the UML Class diagram and enhance last week’s Employee class by making the following changes: 1. Create a static variable called numEmployees that holds an int and initialize it to zero. This will allow us to count all the Employee objects created in the main class. 2. Increment numEmployees in all of the constructors. 3. Add an overloaded method of CalculatePay that will accept a new, or modifed, annual salary value. We will then have two versions of the CalculatePay method (1) that uses the current value of the annual salary for the calculation and (2) one that updates the annual salary with a new value before the calculation. 4. Using properties add accessor (get) and mutator (set) methods to access each of the private attributes and to validate the attribute values before they are set. i L A B S T E P S Understand the UML Diagram Analyze and understand the object UML diagram, which models the structure of the program.  There are no design changes to the Presentation......

Words: 1425 - Pages: 6

Cis 247 Week 3

...HELPIDO.COM --------------------------------------------------------------- FOLLOW THE LINK TO GET THE TUTORIAL http://helpido.com/cis-247-week-3/ --------------------------------------------------------------- CIS 247 WEEK 3 ________________________________________ Week 3: Classes and Encapsulation – iLab iLab 3 of 7: Overloaded Methods and Static Methods / Variables i L A B O V E R V I E W Scenario and Summary The objective of the lab is to take the UML Class diagram and enhance last week’s Employee class by making the following changes: 1. Create a static variable called numEmployees that holds an int and initialize it to zero. This will allow us to count all the Employee objects created in the main class. 2. Increment numEmployees in all of the constructors. 3. Add an overloaded method of CalculatePay that will accept a new, or modifed, annual salary value. We will then have two versions of the CalculatePay method (1) that uses the current value of the annual salary for the calculation and (2) one that updates the annual salary with a new value before the calculation. 4. Using properties add accessor (get) and mutator (set) methods to access each of the private attributes and to validate the attribute values before they are set. i L A B S T E P S Understand the UML Diagram Analyze and understand the object UML diagram, which models the structure of the program.  There are no design changes to the Presentation......

Words: 1425 - Pages: 6

Cis 247 Week 4

...HELPIDO.COM ----------------------------------------------------------- FOLLOW THE LINK TO GET THE TUTORIAL http://helpido.com/cis-247-week-4/ ----------------------------------------------------------- CIS 247 WEEK 4 ________________________________________ Week 4: Designing Using Objects – iLab iLab 4 of 7: Composition and Class Interfaces i L A B O V E R V I E W Scenario and Summary The objective of the lab is to modify the Employee class to demonstrate composition where a containing class (Employee) contains another class (Benefit). An employee typically has benefits, so we will make the following changes: 1. Create a Benefit class. 2. Integrate the Benefit class into the Employee class. 3. Separate the files in the project into Presentation and Logic tier folders i L A B S T E P S STEP 1: Understand the UML Diagram Analyze and understand the object UML diagram, which models the structure of the program.  There are no design changes to the Presentation Tier from the previous project and InputUtilities and ApplicationsUtilities classes are used without modification (except for changing the Application Information).  A new class called Benefits that holds the health insurance company, life insurance amount, and vacation days. There are constant attributes defined for each of the default values and the minimum and maximum values. This composition relationhip is specified in the UML class diagram as a solid diamond......

Words: 1715 - Pages: 7

Cis 247 Week 5

...HELPIDO.COM --------------------------------------------------------------- FOLLOW THE LINK TO GET THE TUTORIAL http://helpido.com/cis-247-week-5/#5 --------------------------------------------------------------- CIS 247 WEEK 5 ________________________________________ Week 5: Composition, Inheritance, and Polymorphism – iLab iLab 5 of 7: Inheritance i L A B O V E R V I E W Scenario and Summary The objective of the lab is to take the UML Class diagram and enhance last week’s Employee class by making the following changes: 1. Create a derived class called Salaried that is derived from Employee. 2. Create a derived class called Hourly that is derived from Employee. 3. Create generalized input methods that accept any type of Employee or derived Employee object 4. Create generalized output methods that accept any type of Employee or derived Employee object 5. Override the base class CalculatePay method 6. Override one of the base class CalculateWeeklyPay methods i L A B S T E P S STEP 1: Understand the UML Diagram Analyze and understand the object UML diagram, which models the structure of the program.  There are two new Employee derived classes (1) Salaried and (2) Hourly that are derived from the Employee class.  The Employee class contains a new attribute employeeType and a new constructor that accepts as an argument the assigned employee type.  Both the Salaried and the Hourly classes override only the......

Words: 1515 - Pages: 7

Cis 247 Week 6

...HELPIDO.COM ------------------------------------------------------------------ FOLLOW THE LINK TO GET THE TUTORIAL http://helpido.com/cis-247-week-6/#5 ------------------------------------------------------------------ CIS 247 WEEK 6 ________________________________________ Week 6: Interfaces and Abstract Classes – iLab iLab 6 of 7: Abstract Classes i L A B O V E R V I E W Scenario and Summary The objective of the lab is to take the UML Class diagram and enhance last week’s Employee class by making the following changes: 1. Convert the Employee class to an abstract class 2. Add an abstract method called CalculateNetPay to the Employee class 3. In both the Salaried and Hourly classes implement the CalculateNetPay method Deliverables Due this week:  Before you post your lab in the dropbox, copy your entire program into a Notepad file and post that. I do not need you to zip the project or give me screen shots of the output. i L A B S T E P S STEP 1: Understand the UML Diagram Analyze and understand the object UML diagram, which models the structure of the program.  The Employee class has been specifed as abstract, which is denoted by the name of the class being italized Employee  The Employee class as a new method CalculateNetPay which is an abstract method, denoted by the italized name of the method. Since this method is an abstract method the CalculateNetPay method WILL NOT have an implementation in the Employee......

Words: 686 - Pages: 3

Cis 247 Week 6

...HELPIDO.COM ------------------------------------------------------------------ FOLLOW THE LINK TO GET THE TUTORIAL http://helpido.com/cis-247-week-6/#5 ------------------------------------------------------------------ CIS 247 WEEK 6 ________________________________________ Week 6: Interfaces and Abstract Classes – iLab iLab 6 of 7: Abstract Classes i L A B O V E R V I E W Scenario and Summary The objective of the lab is to take the UML Class diagram and enhance last week’s Employee class by making the following changes: 1. Convert the Employee class to an abstract class 2. Add an abstract method called CalculateNetPay to the Employee class 3. In both the Salaried and Hourly classes implement the CalculateNetPay method Deliverables Due this week:  Before you post your lab in the dropbox, copy your entire program into a Notepad file and post that. I do not need you to zip the project or give me screen shots of the output. i L A B S T E P S STEP 1: Understand the UML Diagram Analyze and understand the object UML diagram, which models the structure of the program.  The Employee class has been specifed as abstract, which is denoted by the name of the class being italized Employee  The Employee class as a new method CalculateNetPay which is an abstract method, denoted by the italized name of the method. Since this method is an abstract method the CalculateNetPay method WILL NOT have an implementation in the Employee......

Words: 686 - Pages: 3

Cis 247 Week 7

...HELPIDO.COM ------------------------------------------------------------------ FOLLOW THE LINK TO GET THE TUTORIAL http://helpido.com/cis-247-week-7/#5 ------------------------------------------------------------------ CIS 247 WEEK 7 ________________________________________ Week 7: Program Construction – iLab iLab 7 of 7: Putting It All Together i L A B O V E R V I E W Scenario and Summary This week, you will be implementing inheritance by creating a generic Racer base class along with two derived classes called StreetTuner and HotRod. You will make the Racer class abstract and include the abstract method IsDead() in the Racer class. Deliverables Due this week:  Capture the console output window and paste it into a Word Document;  Zip the project folder; and  Put the zip file and screenshots (Word document) in the Dropbox. i L A B S T E P S STEP 1: Understand the UML Diagram STEP 2: Build the Inheritance Hierarchy 1. Create a project called “CIS247_WK7_Lab_LASTNAME”. 2. Build the class structure shown in the UML diagram. Remember to include properties for each class attribute. STEP 3: Implement the Logic for the HotRod Class 1. Provide suitable logic for the ToString method. As always, the ToString method should reveal the state of an object. 2. For the IsDead() method in HotRod, use the logic to implement the base class abstract IsDead method. Hint: To generate a random number, use the following code, which......

Words: 675 - Pages: 3

Cis 247 Week 7

...HELPIDO.COM ------------------------------------------------------------------ FOLLOW THE LINK TO GET THE TUTORIAL http://helpido.com/cis-247-week-7/#5 ------------------------------------------------------------------ CIS 247 WEEK 7 ________________________________________ Week 7: Program Construction – iLab iLab 7 of 7: Putting It All Together i L A B O V E R V I E W Scenario and Summary This week, you will be implementing inheritance by creating a generic Racer base class along with two derived classes called StreetTuner and HotRod. You will make the Racer class abstract and include the abstract method IsDead() in the Racer class. Deliverables Due this week:  Capture the console output window and paste it into a Word Document;  Zip the project folder; and  Put the zip file and screenshots (Word document) in the Dropbox. i L A B S T E P S STEP 1: Understand the UML Diagram STEP 2: Build the Inheritance Hierarchy 1. Create a project called “CIS247_WK7_Lab_LASTNAME”. 2. Build the class structure shown in the UML diagram. Remember to include properties for each class attribute. STEP 3: Implement the Logic for the HotRod Class 1. Provide suitable logic for the ToString method. As always, the ToString method should reveal the state of an object. 2. For the IsDead() method in HotRod, use the logic to implement the base class abstract IsDead method. Hint: To generate a random number, use the following code, which......

Words: 675 - Pages: 3