Devam Ediyor

506271 Program Construction

Week 7: Program Construction - iLab Help icon Help

Print this PagePrint This Page

Remember this!

Connect to the iLab here.

iLab 7 of 7: Business Application

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.)

i L A B O V E R V I E W

Scenario/Summary

In a professional, large business application the application will be constructed using a complete object oriented design, where each class is contained in a separate file and typcially a separate namespaces. This is because in professional applcation, there will be 100's, if not 1000's of files, thus a well structured and organized project structure is required.

Production software, whether a retail game or a business solution, quickly becomes complex with many different components. The entire project can take months or years to complete. How do software development firms manage the complexity of a major project and allow teams of programmers to develop different parts of the software at the same time? They design the project with classes that can be put together to create the solution, and they organize related classes into different namespaces to manage the many classes involved.

In this lab, we are going to create a Payroll System with different classes and namespaces. We are going to save employee information to a file as the information is entered. We will read from the file and, using polymorphism, we will print paychecks for our employees regardless of their employee type.

You will be given the graphical user interface as a "shell project" and you will then be asked to implement the interface and inheritance hierarchy and classes, and then "wire" in the classes to the GUI. So, the actual programming and construction work is not overbearing as long as you take the time to analyze the UML diagrams, correctly implement the classes, and ensure that you understand that concept of generalized algorithms using the base classes.

Follow these steps carefully to learn about creating large object oriented applications.

Deliverables

Step

Deliverable

Step 4

Screen shots of running program results.

Step 5

Zip file with entire Lab files.

Lab Steps

Preparation:

If you are using the Citrix remote lab, follow the login instructions located in the iLab tab in Course Home.

Locate the Visual Studio 2008 icon and launch the program.

You will use Lab 5 as the base for this lab.

i L A B S T E P S

Step 1: Download the Shell Solution

Back to top

Download the Week 7 iLab Shell Project solution.

Extract the project to a known location.

Open up the shell project.

You will notice that all the user interface forms and the classes shells are created, and that the program will build and execute; however, the operations are not functional.

Open up each of the class files and ensure the Comments window is open (Select VIEW|OTHER WINDOWS|TASK LIST, then select "Comments" from the drop down box).

Your task in this lab will be do implement each of the listed TODO comments using the following UML diagram and pseudocode as a guide.

Double click on any of the TODO comments to take you to the block of code that needs to be modified or implemented.

Using the UML diagram and pseudocode implement the missing blocks of code. It is recommended that you start with the Employee class, then work your way through the UML diagram implementing each block individually.

Note: while there seems to be a lot of TODO comments, no single task is more than four lines of code and many are a single line of code. The coding part is relatively simple; if you understand the overall inheritance structure and how the base classes and dynamic binding work.

STEP 2: Realize the UML Class Diagram

Back to top

Realize the following UML Class diagram (take it to code). Notice that the Employee class name and the WeeklyPay( ) method name are both italicized to indicate that they are abstract.

The code for the WeeklyPay methods in the child classes are:

* Hourl(y class

// calculate and return the weekly pay

double pay = 0.0;

if( hours <= 40.0 )

pay = rate * hours;

else

pay = (hours - 40.0) * 1.5 * rate

+ 40.0 * rate;

return pay;

* Salary class

// calculate and return the weekly pay

return annualSalary / 52.0;

* Contract class

// calculate and return the weekly pay

return amount / weeks;

* Employee class – code for ToString( ) method

// return the name of the payee

return firstName + " " + lastName;

* Employee class – code for GetAmount( ) method

// return the amount to pay the employee

return WeeklyPay( );

* Notice that the abstract Employee class inherits from the IPayable interface. You need to implement the inheritance relationship.

STEP 3: Compile and Test

Back to top

Build your project (this will compile the programs for each form) by clicking on Build, Build application name. Then debug any errors in the Error Window until your code is error-free.

To execute your code, click Start and then Start Debugging. Check your output and confirm that the Hotrod wins sometimes and the Tuner wins sometimes. If you need to fix anything, close your execution window, modify your code as necessary, and rebuild.

STEP 4: Execution Screen Prints

Back to top

Add some employees using the different types that are available. Delete a few employees as well. Confirm that the btnDisplay button works effectively. Finally, be sure that a printer is hooked up to your computer and print your paychecks!

Capture the results of each test and paste them into a Word document.

STEP 5: Submit Deliverables

Back to top

Put all of the Visual Studio files into a zip file.

Put the zip file and execution screen shots (Word document) 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 Tutorial icon Dropbox Tutorial.

See Syllabus/"Due Dates for Assignments & Exams" for due date information.

Beceriler: Her şey Kabul, Oyun Tasarımı, Grafik Tasarımı, Simge Tasarımı, PHP, Web Sitesi Yönetimi

Daha fazlasını görün: work home programmers, work home payroll, work home guide, work home program, work home free start, windows programming tutorial, windows application icon design, need programmers develop software, visual studio programmers, visual hierarchy graphic design, visual design retail, user diagrams, use algorithms programming, uml tutorial free, uml task, uml programs free, uml programming tutorial, uml program free download, uml program free, uml program download, uml login, uml free tutorial, uml free program, uml free download, uml download free

İşveren Hakkında:
( 2 değerlendirme ) Lewisville, United States

Proje NO: #2252197