Computer and Information Sciences 192

Project 2. Output Module Design and Implementation


The successful student will be able to:

A. Create and use screen templates to design screen output,

B. Use cout, cin, basic add and subtract operations, and the use of comments to implement user interface screens,

C. Include appropriate "header files" to implement library functions.

Skills Assumptions:

Basic input/output knowledge and basic arithmetic operations.


The design of software systems is often centered around the screen sequencing or presentation sequence of the software package. Most programming efforts are implemented by programming teams which need some common "rules", standards, or style by which to work. These standards attempt to ensure that the work by the various teams is compatible.

One of the standards often used in the development of the screen sequence is the screen or printer spacing chart. The standardization of screens typically results in a more user-friendly sequence and a more professional appearing product.  Each screen is plotted on a separate screen spacing chart and labeled.

Figure 1 presents an example of a hypothetical "project screen template".

Lines 1 - 5
< Project and Screen Titles >

Lines 7 - 19
< Body of the Screen >

Lines 23 - 25
< User Prompt and Message Area >

Figure 1. An example of a "project template" for screens.



Figure 2, which is hyperlinked is a screen design chart that can be used to create the specific designs for each of the screens in the project.



Assume you are to develop three screens for the Miramar College Bookstore Order System -- a system title screen; a data input screen consisting of  ISBN, Book Title, Author, Publisher, Expected enrollment, Price, Required/Not Required, New/Used; and a screen to present the results of a specified calculation sequence. Figure 3 presents a possible design for a system title screen. Note that the title screen is a bit of an exception in that the body of the screen is the title of the project. Figure 4 presents a possible design for a user input screen. Once again this is only a model, creativity is highly recommended. Figure 5 is a screen that might be used as an output model for the "calculation output screen".

Figure 3. An example of a system title screen.
Figure 4. A sample user input screen.
Figure 5. An example of a data output screen.

Other requirements and comments of the system are --

  1. The screen sequence should be designed for a monochrome machine,
  2. The design selected here will be the basis for the screens that will be designed for the remainder of the project, however the basic design may be modified as the understanding of the projects becomes better.
  3. Each screen should be consistent with all other screens.


Screen Requirements:

Title Screen - should include the project title, programmer, latest revision date, and user prompt to continue. This is where you can be very creative about screen design. Just remember you are using text characters and that somewhat limits your creativity.

Data Input Screen - should display the project name and page title. It should then display a brief user instruction (something like "At each prompt enter the appropriate data and press ENTER"). Then the screen should display a prompt line alternating with user input. All data should be entered as character strings. The following should be entered for each record: ISBN, Title, Author, Price, Enrollment, New/Used, Required/Not Required The price and enrollment should be entered as strings which will later be converted to appropriate data types using the atoi() and atof() conversion functions.

Calculation and Output Screen - should display the following: ISBN, Title, Author, Price, Enrollment, New/Used, Required/Not Required, and the calculation for number of books to be ordered. The string enrollment should be converted into an integer using the atoi() function; the price should be converted into a double using the atof() function immediately preceding the use in calculations. For an example, refer to the following program segment --

#include < cstdlib > // included for the atoi()
#include < string > // included for the string class

int d;// integer variable
string day;// string variable
cout<<"Enter a date: "; // prompt
cin>>day;// data entry
d=atoi(;// IMPORTANT use of atoi()

// Note that creates a character array which is used by atoi() (or atof() )

//Newer versions of C++ incorporat stoi() and stod() which are not recognized by all compilers.
//We will use the technique above for our code.

// The rest of the pgm.

Be sure to include the "cstdlib" header file for the definitions of atoi() and atof().

Project Evaluation
This and all subsequent project will be submitted in two parts -- 1) program documentation and 2) program implementation and execution.


Development documentation

This portion must be evaluated prior to the implemention and evaluation of the code and execution. This includes the IPO chart and design for each screen (10 possible points for each component). Attach all components to an e-mail and submit to the e-mail indicated in the syllabus for review (40 possible points total).


Implementation and execution

Create the code for each of the three required screens within the same program in accordance with your documentation. Be sure to comment and space as appropriate for ease of reading. Have a hardcopy of your code prepared for review. (10 possible points) You will be directed to execute your program and enter specified data.(50 possible points).


Opening Screen
The coding sequence for the opening screen should minimally indicate the program name, the author, and the date of the last revision. Each operational sequence should be liberally commented as to the actions being accomplished.  Keep the coding for each of the screens separate and comment the beginning and ending of each screen.  Each of the separate segments will be used as the basis for the development of "user-defined" functions in the next project.


Input Screen
1) The project name and screen title should be displayed,
2) user instructions,
3) a prompt for each data item should have a prompt and allow the use respond, and
4) there should be a user prompt to continue with the program (ie. "Press ENTER to Continue").


Output Screen
1) Display the project name and screen title,
2) Calculate the number of books to order based on the enrollment and "quantity order factor" (to be provided in class),
3) Display the number of books to be ordered,
4) Prompt the user to continue.


Evaluation Check List

The following is a checklist for the evaluation package for Project 2 -

___A. Project 2 Performance Evaluation Sheet printed and available,

___B. Development documentation complete and evaluated,

___C. Program Listing (code) available for review (to be submitted prior to execution),

___D. Prepare 5 different and complete sets of data that you used to test your program. Complete the anticipated calculations on paper for each data set, for varification (to be submitted with program listing).