Full Course New Sol- CIS 247A CIS 247A Entire Course HELP – Devry University PDF

Title Full Course New Sol- CIS 247A CIS 247A Entire Course HELP – Devry University
Author Dissertation-hero uk
Course CIS -Object Programming
Institution DeVry University
Pages 26
File Size 421.2 KB
File Type PDF
Total Downloads 12
Total Views 121

Summary

Full Course New Sol: CIS 247A CIS247A ENTIRE COURSE HELP – DEVRY UNIVERSITY
DOWNLOAD READY SOLUTION HERE:


https://www.solvedcollegepapers.com/product/cis-247a-cis247a-cis-247a-ent/


CIS 247A CIS247A CIS/247A ENTIRE COURSE HELP – DEVRY UNIVERSITY
CIS...


Description

Full Course New Sol: CIS 247A CIS247A ENTIRE COURSE HELP – DEVRY UNIVERSITY DOWNLOAD READY SOLUTION HERE:

https://www.solvedcollegepapers.com/product/cis-247a-cis247a-cis-247a-ent/

CIS 247A CIS247A CIS/247A ENTIRE COURSE HELP – DEVRY UNIVERSITY CIS 247A Week 7 iLab Putting It All Together CIS 247A 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. iLAB STEPS STEP 1: Understand the UML Diagram Full Course New Sol: CIS 247A CIS247A ENTIRE COURSE HELP - DEVRY UNIVERSITY quantity Category: Assignments Help Experts Tags: CIS 247A CIS247A CIS/247A Object-Oriented Programming - DeVry University, CIS247, CIS247A Week 1 iLab Creating a User Interface, CIS247A Week 2 iLab Object Construction and Data Abstraction, CIS247A Week 3 iLab Overloaded Methods and Static Methods Variables, CIS247A Week 4 iLab Composition and Class Interfaces, CIS247A Week 5 iLab Composition Inheritance and Polymorphism, CIS247A Week 6 iLab Abstract Classes, cis247a week 7, cis247a week 7 ilab, cis247a week 7 lab, CIS247Acis247a lab 7, java 

Description

Description

CIS 247A CIS247A CIS/247A ENTIRE COURSE HELP – DEVRY UNIVERSITY CIS 247A Week 7 iLab Putting It All Together CIS 247A 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. CIS 247A CIS 247A iLAB STEPS CIS 247A STEP 1: Understand the UML Diagram The UML diagram four classes defined (1) Racer, (2) Engine, (3) Hot Rod, and (4) StreetTuner classes. The Racer class is the base parent abstract class of the Hot Rod and Street Tuner classes, which is represented by a directed line from the Hot Rod and Street Tuner classes to the Racer class and the end of the line touching the Racer class is a broad, unfilled arrow head. The racer class contains a engine object, which is represented by a directed line from the engine class to the Racer class, with a filled diamond touching the racer class, this line is labeled as a 1 to 1 relationship meaning that each racer object will contain one engine object and each engine is related to a single racer object. CIS 247A The class’s attributes and methods are defined in separate class diagrams, and each class diagram is represented by a rectangular box subdivided into three vertically separated rectangular sub-sections. The top section contains the class name, the middle section contains the class attributes, and the bottom section contains the class methods. CIS 247A CIS 247A 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. CIS 247A 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 returns a random number. CIS 247A from 0 to 1: 1 2 3 4 5 6 7 Random rnd = new Random(); 8 rnd.NextDouble(); 9 Pseudocode for the IsDead method of HotRod 1 Random rnd = new Random(); 0 boolean dead 11if (speed > 50 && rnd.NextDouble() > 0.6) if (engineHorsePower < 300 && blower=true) 1 dead = false 2 else 1 dead = true 3 end if if (speed > 100 && rnd.NextDouble() > 0.4) 1 else if (engineHorsePower >= 300 && blower = true) 4 dead = true 1 else 5 dead = false 1 end if else 6 dead = false 1 end if 7 1 8 1 9 2 0 CIS 247A STEP 4: Implement the logic for the StreetTurner 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 StreetTurner, use the logic below to implement the inherited abstract base class method called IsDead. CIS 247A 1 2 3 4 5 6 Pseudocode for the IsDead method of StreetTuner 7 Random rnd = new Random(); 8 boolean dead 9 if (speed > 50 && rnd.NextDouble() > 0.6) 1 if (engineHorsePower < 300 && nitrous=true) dead = false 0 else 11dead = true 1 end if 2 else if (speed > 100 && rnd.NextDouble() > 0.4) (engineHorsePower >= 300 && nitrous = true) 1 if dead = true 3 else 1 dead = false 4 end if 1 else dead = false 5 end if 1 6 1 7 1 8 CIS 247A STEP 5: Construct the Main Program 1. Create an array of Racer objects that will hold two Racer objects. 2. Write a method called CollectRacerInformation that accepts as an argument a Racer object, and then prompts the user to provide the following information for each racer: o Racer name; o Racer Speed; o Number of cylinders in the racer’s engine; o Horsepower of the racer’s engine; and o Nitrus or blower option, depending on the type of Racer object. CIS 247A [Hint: In order to be able to collect all information for the derived classes as well, consider creating a base class method called ReadRacerData in the Racer class, which you will then

override in the derived classes to capture the required info per class. Call the ReadRacerData method within the CollectRacerInformation method.] 3. Write a method called “DisplayRacerInformation” that accepts as an argument a Racer object, and then displays all of the information for the specific racer type. 4. Create a racer object of each type, and invoke the CollectRacerInformation passing in the Racer object. Then, store each object in the array. 5. Iterate through the Racer array list and, for each Racer, display all of the Racer’s attribute information (call the DisplayRacerInformation method for each object). Don’t forget to indicate whether or not the Racer is dead! CIS 247A CIS 247A STEP 6: Compile and Test When done, compile and run your program. Then, debug any errors until your code is error-free. Check your output to ensure that you have the desired output and modify your code as necessary and rebuild. CIS 247A CIS 247A STEP 7: Submit Deliverables 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. 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.      

CIS247A Week 2 iLab Object Construction and Data Abstraction CIS247A Week 3 iLab Overloaded Methods and Static Methods Variables CIS247A Week 4 iLab Composition and Class Interfaces CIS247A Week 5 iLab Composition Inheritance and Polymorphism CIS247A Week 6 iLab Abstract Classes CIS247A Week 7 iLab Putting It All Together, CIS 247A

CIS 247A CIS247A CIS/247A ENTIRE COURSE HELP – DEVRY UNIVERSITY CIS 247A Week 6 iLab Abstract Classes CIS 247A 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 CIS 247A STEP 1: Understand the UML Diagram Analyse and understand the object UML diagram, which models the structure of the program. 1. The Employee class has been specified as abstract, which is denoted by the name of the class being initialized Employee 2. 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 class. 3. The Salaried and Hourly classes both have a new method CalculateNetPay that is inherited from the abstract Employee class and the Salaried and Hourly class both MUST implement the CalculateNetPay method. CIS 247A CIS 247A STEP 2: Create the Project You will want to use the Week 5 project as the starting point for the lab. Use the directions from the previous weeks labs to create the project and the folders. 1. Create a new project named “CIS247_WK6_Lab_LASTNAME”. An empty project will then be created. 2. Delete the default Program.cs file that is created. 3. Add the Logic Tier, Presentation Tier, and Utilities folders to your project 4. Add the Week 5 project files to the appropriates folders. 5. Update the program information in the ApplicationUtilities.DisplayApplicationInformation method to reflect your name, current lab, and program description. CIS 247A Note: as an alternative you can open up the Week 5 project and make modifications to the existing project. Remember, there is a copy of your project in the zip file you submitted for grading. Before attempting this week’s steps ensure that the Week 5 project is error free.      

CIS 247A Week 2 iLab Object Construction and Data Abstraction CIS 247A Week 3 iLab Overloaded Methods and Static Methods Variables CIS 247A Week 4 iLab Composition and Class Interfaces CIS 247A Week 5 iLab Composition Inheritance and Polymorphism CIS 247A Week 6 iLab Abstract Classes CIS 247A Week 7 iLab Putting It All Together

CIS 247A STEP 3: Modify the Employee Class 1. Modify the class declaration of the Employee class to specify that the Employee class is an abstract class 2. Declare an abstract method called CalculateNetPay that returns a double value. 3. Modify the ToString Method to include the weekly net pay in currency format. CIS 247A STEP 4: Modify the Salaried Class

1. Add a double constant called TAX_RATE and set the value to .73 2. Implement the CalculateNetPay method by multiplying the weekly pay by the tax rate. CIS 247A STEP 5: Modify the Hourly Class 1. Add a double constant called TAX_RATE and set the value to .82 2. Implement the CalculateNetPay method by multiplying the weekly pay by the tax rate. CIS 247A STEP 6: Create the Main Program 1. 2. 3. 4.

Change the employeeList array to only hold two objects. Create one Hourly employee object and store it in the array. Create one Salaried employee object and store it in the array. As you did in the Week 5 lab, prompt for and collect the information for each of the objects.

Note: iterating through the array should not require any changes from the previous iteration of the project–but make sure that the loop stays within the bounds of the array. CIS 247A CIS 247A STEP 7: Compile and Test When done, compile and run your program. Then debug any errors until your code is error-free. Check your output to ensure that you have the desired output and modify your code as necessary and rebuild.

CIS 247A CIS247A CIS/247A ENTIRE COURSE HELP – DEVRY UNIVERSITY CIS 247A Week 5 iLab Composition Inheritance and Polymorphism CIS 247A 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. 

CIS 247A Week 2 iLab Object Construction and Data Abstraction

    

CIS 247A Week 3 iLab Overloaded Methods and Static Methods Variables CIS 247A Week 4 iLab Composition and Class Interfaces CIS 247A Week 5 iLab Composition Inheritance and Polymorphism CIS 247A Week 6 iLab Abstract Classes CIS 247A Week 7 iLab Putting It All Together, CIS 247A

CIS 247A 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. CIS 247A CIS 247A iLAB STEPS STEP 1: Understand the UML Diagram Analyze and understand the object UML diagram, which models the structure of the program: 1. There are two new Employee derived classes (1) Salaried and (2) Hourly that are derived from the Employee class. 2. The Employee class contains a new attribute employeeType and a new constructor that accepts as an argument the assigned employee type. 3. Both the Salaried and the Hourly classes override only the CalculateWeeklyPay method of the Employee class (note, this is the method without any parameters.) 4. The Salaried class has one attribute “managementLevel” that has possible values from MIN_MANAGEMENT_LEVEL to MAX_MANAGEMENT_LEVEL and a BONUS_PERCENT. 5. The Salaried class has a default constructor and parameterized constructor that accepts all the general employee information plus the management level. 6. The Hourly has a wage attribute, which respresents the hourly wage that ranges from MIN_WAGE to MAX_WAGE, a hours attributes, which represents the number of hours worked in a week that ranges from MIN_HOURS to MAX_Hours, and a category attributes that accepts string values. 7. The Hourly class has a default constructor and parameterized constructor that accepts all the general employee information plus the hours and wage value. 8. The Presentation Tier contains two new classes (1) The EmployeeInput class and the EmployeeOutput class 9. The EmployeeInput class contains three static methods: o CollectEmployeeInformation, which accepts any type of Employee object as a argument. o CollectHourlyInformation, which accepts only Hourly objects as an argument. o CollectSalariedInformation, which accepts only Salaried objects as an argument. 10. The EmployeeOutput class contains two methods o DisplayEmployeeInformation, which accepts any Employee type as an argument. o DisplayNumberObjects method. 11. All the access specifers for the Employee attributes are changed to protected and are depicted with the “#” symbol. CIS 247A STEP 2: Create the Project You will want to use the Week 4 project as the starting point for the lab. Use the directions from the previous weeks labs to create the project and the folders.

1. Create a new project named “CIS247_WK5_Lab_LASTNAME”. An empty project will then be created. 2. Delete the default Program.cs file that is created. 3. Add the Logic Tier, Presentation Tier, and Utilities folders to your proejct 4. Add the Week 4 project files to the appropraties folders. 5. Update the program information in the ApplicationUtilities.DisplayApplicationInformation method to reflect your name, current lab, and program description Note: as an alternative you can open up the Week 4 project and make modifications to the existing project. Remember, there is a copy of your project in the zip file you submitted for grading. Before attempting this week’s steps ensure that the Week 4 project is error free. CIS 247A CIS 247A STEP 3: Modify the Employee Class 1. Change the access specifier for all the private attributes to protected. 2. Add the new attribute employeeType, along with a “read only” property (that is only a “get” method) to access the employee type value. 3. Add a new constructor that only accepts the type attribute, which is then used to set the employeeType value. Also, this constructor should initialize all the default values. You can call the default constructor using the syntax: 4.

public Employee(string employeeType) : this() { }

5. Modify the parameterized constructor that accepts the employee information to accept the employee type, and then set the employeeType with this value. 6. Modify the ToString Method to include the employee type.      

CIS 247A Week 2 iLab Object Construction and Data Abstraction CIS 247A Week 3 iLab Overloaded Methods and Static Methods Variables CIS 247A Week 4 iLab Composition and Class Interfaces CIS 247A Week 5 iLab Composition Inheritance and Polymorphism CIS 247A Week 6 iLab Abstract Classes CIS 247A Week 7 iLab Putting It All Together, CIS 247A

CIS 247A STEP 4: Create the Salaried Class 1. Using the UML Diagrams, create the Salaried class, ensuring to specify that the Salary class inherits from the Employee class. 2. For each of the constructors listed in the Salaried class ensure to invoke the appropriate super class constructor and pass the correct arguments to the super class constructor. 3. Override the CalculateWeeklyPay method to add a 10 percent bonus to the annualSalary depending on the management level. The bonus percent is a fixed 10 percent, and should be implemented as a constant. However, depending on the management level the actual bonus percentage fluctuates 4. (i.e., actualBonusPercentage = managementLevel * BONUS_PERCENT).

5. Override the ToString method to add the management level to the employee information. CIS 247A STEP 5: Create the Hourly Class

1. Using the UML Diagrams, create the Hourly classes, ensuring to specify that the Hourly class inherits from the Employee class. 2. For each of the constructors listed in the Hourly class ensure to invoke the appropriate super class constructor and pass the correct arguments to the super class constructor. Notice, that the Hourly employee DOES NOT have an annual salary, which we will then have to calculate (see below). 3. Create a Category property (get/set) and the valid category types are “temporary”, “part time”, “full time”. 4. Create a Hours property (get/set) for the hours attributes and validate the input using the constants shown in the UML diagram, but since an Hourly employee does not have a formal annual salary we will need to calculate this each time the hour (and wage) properties are set. Add the following code after the validation code in the hours property: CIS 247A 5. base.AnnualSalary = CalculateWeeklyPay() * 48; (assumes working 48 weeks a year).

6. Create an Wage property (get/set) for the wage attributes and validate the input using the constants shown in the UML diagram. Add the following code after the validation code in the wage property: 7. base.AnnualSalary = CalculateWeeklyPay() * 48; (assumes working 48 weeks a year)

8. Override the CalculateWeeklyPay method by multiplying the wages by the number of hours. 7. Update the ToString method to add the category, hours, and wages to the hourly employee information.      

CIS 247A Week 2 iLab Object Construction and Data Abstraction CIS 247A Week 3 iLab Overloaded Methods and Static Methods Variables CIS 247A Week 4 iLab Composition and Class Interfaces CIS 247A Week 5 iLab Composition Inheritance and Polymorphism CIS 247A Week 6 iLab Abstract Classes CIS 247A Week 7 iLab Putting It All Together

CIS 247A STEP 6: Create the EmployeeInput Class 1. Create a new class in the Presentation Tier folder called “EmployeeInput” 2. Create a static void method called CollectEmployeeInformation that has a single Employee parameter. The declaration should look something like the following: 3. public static void CollectEmployeeInformation(Employee theEmployee)

4. Write code statements similiar to what you created in the Week 4 project to collect the generic employee information from the user, except instead of using specific employee objects use the “theEmployee” parameters. For example: In Week 4, you had something like: 5. employee1.FirstName = InputUtilities.GetStringInputValue(“First name”);

In the CollectionEmployeeInformation method this can be translated to the following; theEmployee.FirstName = InputUtilities.GetStringInputValue(“First name”);

6. Write statements to collect all the generic employee information, including the Benefits information, as you did in the Week 4 project. However, since not all derived types have a AnnualSalary value, DO NOT collect the annual salary data.

7. Create a new static void method c...


Similar Free PDFs