+ All Categories
Home > Documents > Project 5: Printing Address Labels

Project 5: Printing Address Labels

Date post: 02-Jan-2016
Category:
Upload: kadeem-emerson
View: 42 times
Download: 0 times
Share this document with a friend
Description:
Project 5: Printing Address Labels. Assignment. Write a Windows forms program to display and print a set of address labels. Input from a csv file. Use Windows graphics to draw the labels. Show the labels In order of Zip Code, Last Name, First Name Top to bottom, then left to right - PowerPoint PPT Presentation
Popular Tags:
13
1 Project 5: Printing Address Labels
Transcript
Page 1: Project 5: Printing Address Labels

1

Project 5: Printing Address Labels

Page 2: Project 5: Printing Address Labels

2

Assignment

Write a Windows forms program to display and print a set of address labels. Input from a csv file. Use Windows graphics to draw the labels.

Show the labels In order of Zip Code, Last Name, First Name Top to bottom, then left to right 4 labels across by 12 top to bottom (OK if a few addresses overlap edge of label)

Page 3: Project 5: Printing Address Labels

3

Main Menu

Provide a File menu with an Open command. Use Open File Dialog control to permit user

to select CSV file to open.

Provide Print and Print Preview commands Print pages as shown on the form. Provide a PrintDialog for the print command

Permit user to select From and To pages. Commands enabled only when there is something

to print.

Page 4: Project 5: Printing Address Labels

4

Main Menu

Provide a “View” menu with commands: Previous Page Next Page

Also an Exit command.

All commands should be enabled only if applicable.

Page 5: Project 5: Printing Address Labels

5

Sample Data File

A sample data file is available in the Downloads area of the class web site:

http://www.cse.usf.edu/~turnerr/Software_Systems_Development/Downloads/addresses.csv

Page 6: Project 5: Printing Address Labels

6

Example: The Form

Page 7: Project 5: Printing Address Labels

7

Print Preview

Page 8: Project 5: Printing Address Labels

8

Implementation Hints

Think carefully about an object-oriented design. What are the classes? What are their responsibilities?

Attributes and operations?

The same methods should paint the form and print the page. Graphics parameter determines which it

does. Different calls pass different Graphics

objects to paint the form and print the page.

Page 9: Project 5: Printing Address Labels

9

Implementation Hints

After class design is sketched out Start with minimal implementation

and add functionality in small steps. Try to reuse code from in-class

example. Be sure each step is working

correctly, and you understand it, before adding next step.

Revise class definitions as needed.

Page 10: Project 5: Printing Address Labels

10

Implementation Hints

Implement Open command. Read Addresses file. Build List<Address_Record> Sort List by zip code, last name, first name.

Display first page of labels on Form1. Add Print command for first page only. Implement Next Page and Previous Page commands.

Show any page on form. Add ability to print all pages. Add PrintDialog

Permit user to specify which pages to print. Permit user to cancel Print command

Add Print Preview

Page 11: Project 5: Printing Address Labels

11

Ground Rules You may work with one other person.

OK to work alone if you prefer.

If you do work as a pair Both members are expected to contribute. Submit a single program. Both members should understand the

program in detail.

Do not share your code with other students. Before or after submitting the project. OK to discuss the project.

Do not copy any other student’s work. Don’t look at anyone else’s program. Don’t let anyone look at your program.

Page 12: Project 5: Printing Address Labels

12

Ground Rules

Except for code posted on the class web site

Do not copy code from the Internet or any other source.

Write your own code.

Page 13: Project 5: Printing Address Labels

1313

Due Date

Project is due by 11:59 PM Wednesday night, March 30.

Deliverables: Project Folder (zipped)

Zip the project folder and submit a single file. Use the Windows “Send to Compressed File”

command. DO NOT use RAR.

If you work with another student, include both names in the assignment comments.

Other student submit Blackboard comment only with both names.

End of Presentation


Recommended