Friday, November 13, 2009

Case Study


This post is part of my ongoing effort to familiarize the readers with the commonalities & variabilities of C++/Java/C# programming languages. A tentative outline of this series can be found at Contents.

Programming needs exercises. You can be a good Software Engineer without coding, but to be a programmer you need to write code. Continuous exercise can make you better (nobody is perfect in programming). For all these three languages, we will develop a simple hex viewer program. It should load a file and view the binary contents of it as hexadecimal values. The user should be able to select alternative view types e.g. octal, binary or decimal.

I have sketched a class diagram of the program which is depicted in the following:


HexViewer: It is the main class and will load a file, adjust the size of the display window and manages other objects to print the contents of the file on the window.

DataViewer: It is responsible for printing the hexadecimal contents.

HexConverter: It converts the binary contents of the file into hexadecimal values. The program can be extended with introducing more converter types like Binary converter of binary display, octal converter for octal display, ascii converter for ASCII display.

In my other blogs related to software engineering and test driven development, I will elaborately explain the various stages of SE-lifecycle for developing a software illustrating this program as an example.

No comments:

Post a Comment