CSC104 ASSIGNMENT 2 - Summer 2000
Department of Computer Science
University of Toronto
Due Wednesday June 28th at 11:30 p.m. (drop box)

OBJECTIVES:

The objective of this assignment is to provide you with some programming experience, using the Microsoft Visual Basic programming language. In addition to the material presented in the course texts (CSC104 Course Package and optionally the Essentials of Visual Basic 6.0 Programming) the information you need to finish this assignment will be provided during your lectures in the coming weeks. Should you require more information, you may be able to find additional Visual Basic references in a library.
 

SCENARIO

Your client is the developer of a well-known GUI Operating System whose target market is the world of personal computers and workstations. In order to make their OS even more competitive in the market, they have decided to include several tools/utilities, including one that allows embedded software developers to easily convert integers to/from the binary, octal and decimal number systems.
 

YOUR ASSIGNMENT

Your project is to write a Visual Basic program that would read in a positive integer from the user, allow the user to specify the base of this integer, and then translate this integer to a different base, also specified by the user. The result of this conversion will then be displayed for the user.

Although the scope of this project is only the conversion of positive integers from binary, octal or decimal to one of the other two bases, you may not make any assumptions about the nature of the user's input. Therefore, your program should behave gracefully when the user enters invalid input. This would mean that instead of your program crashing under such circumstance, an error message must be displayed to inform the user that the input they have entered is invalid and allowing them to continue. Much of this code has already been provided for you.

It is our recommendation that you perform "white-box testing" (testing each component of your application, one by one) as you are developing the application. Doing this would maximize the possibility of catching "bugs" before they propagate and impact the next component of your application. Only once you have finished all of the project (and you are confident that each component is behaving correctly) should you attempt any "black-box testing" (testing the overall behaviour of your application). To do so, you must run your application against a carefully designed set of test cases to ensure that it behaves as expected. In generating your set of test data, please make sure that you cover all "boundary test-cases."

When you are sure that your program works perfectly, remove any code that you added for the purpose of debugging your program, before submitting your code. Please note that a very convenient way to debug your code is to temporarily add a new label to your form (e.g., Label1). To examine the contents of a variable that you're using in your program, you can display it on this label (e.g. To see a variable called Count on this label, add the following code to your program: Label1.Caption = Label1.Caption & Count).
 

PROVIDED COMPONENTS

You are provided with about 75% of the program and are required to complete the remaining 25%. The program you are provided with has a modular design. This means that the application is constructed using a set of functions/procedures (each responsible for a different component of the overall application) which get called once the trigger event has occurred. The following is a list of the functionality with which you have been provided:


COMPONENTS TO BE COMPLETED

Your assignment consists of the completion of the six number system conversion subroutines, whose signature (first line indicating the name of the subroutine, the parameter(s) it will take and its return value, if any) has already been provided to you.

The following is a list of functions which you  need to complete:


SUBMISSION

The following is a list of things which you need to submit for this assignment:

SOME SMART ADVICE

The following is a list of things which you should keep in mind while doing your assignment.



© 2000 William Ghorishi