Department of Computer Science

College of Engineering, University of Nevada, Reno

 

CS 425/625 Software Engineering

 

Guidelines for Project Part 2

 

November 03, 2003

 

1    Adding Methods to Classes

 

1.1 Recommended Format

 

      I recommend that you simply list the methods in the classes of the class diagram and, separately, describe each method using the following format.

 

Table I Recommended Format for Describing Methods

 

Class

 

Method

 

Visibility

 

Return type

 

Parameters, types

 

Methods called

 

Messages

 

Description

 

 

      Note that rows Methods called and Messages are not required, but they are included here for the sake of completeness.

     

1.2 Two Examples

 

      Below are two examples, one simple, one more complex related to last year’s project (2002). The first one is a simple query operation that doesn’t change the state of the object, while the second is a higher-level method.

 

Table II Method player:getNumber()

           

Class

Player

Method

getNumber

Visibility

public

Return type

int

Parameters, types

none

Description

Simple query operation that returns the number assigned to a player

 

      Note that in the title of Table II the name of method is player:getNumber(), which means this method that can be invoked through each object of the class Player. If it were a class method in the Java sense (invoked only through the class), it would have been denoted Player:getNumber().

 

Table III Method game:runSimulation()

           

Class

Game

Method

runSimulation

Visibility

private

Return type

boolean

Parameters, types

firstTeam:Team, secondTeam:Team, result:GameResult

Description

Higher level method that simulates the evolution of a game. Returns true if game is completed, false if cancelled. 

 

 

 

2    Designing the User Interface

 

2.1 An Example of Text-based User Interface

 

For designing the user interface, I suggest that you proceed in a top-down fashion: start with the main menu (or window) and go down to details via functions and sub-functions. An example of screenshot for a text-based interface related to last year’s project (2002) is given in Fig. 1. Note the use of a fixed-size font, Courier in this case.

 

 


Screen #1

 

Description: Main user interface of the Brio Cup software

 

 


Select one of the following options:

 

1 Parameterize Competition

 

2  Register Teams

 

3  Schedule Competition

 

4  Proceed to Next Game

 

5  Display Statistics

 

6  Display Reports

 

7 Cancel Competition

 

8 Exit

 

Your selection (a number between 1 and 8): _   

 

 

 

 

 

 

Fig. 1 Example of Text-based User Interface

 

 

 

2.2 Pointer to a GUI Design

 

For an example of GUI description I refer you to Appendix C of my PhD thesis (p. 359-374), available through a link in the Extras section of the course’s web-page. It shows the design of Harmony, an integrated environment for combined semi-formal (UML) and formal (Z++) software specification. Of course, this example is more complex than what you are required to do for part 2 of the project but it might give you an idea on how the description of a GUI can be done, starting from the main window and then continuing with menus, submenus, and so on.