CSc 330 - OOD & Systems Programming - Professor Domanski

 

Lab Assignments 1-3

 

All programs must have your name, and lab number on them; in additions, all programs must be commented (you don't have to go crazy, but the comments should explain enough so that someone who doesn't know the program can follow the general flow of the program).

 

Lab 1 - Given a Principal of $10000.00, an Interest rate of 8.5%, and the Number of years in the period equal to 5, compute the value A which is the interest given when the principal is compounded by the interest rate over the period; the formula:

 

P, I and A must be defined so they can handle fractional parts, and N should be an integer. Your output need not be fancy.  You should use a simple main program that calls on methods that are defined with a banking object   to initialize the object and then to compute the value of A.  One of the methods of the object should also be used to pass A back to the main program. The object should be able to deal with any type of parameters that are numeric - integers, single's, double's, longs, etc. 

 

What You Need To Know - How to set up and invoke objects and templates.

 

Due - 9/25


 

Lab 2 - Create a data file where each line has a value of P, I and N.  Make your program read the data file, line by line, from the file, and then produce a report similar to the one below –

 

Case     Principal                        Interest     # of Years         Income (A)

 1         $10,000.00                     8.5%            5                  $15,036.55

 2             . . .                    .                         .                               .

 

What You Need To Know - Setting up and using an input/data file and an output file, and converting from character data to numeric.

 

Due - 10/2


 

Lab 3 - Redo the basic Lab 1 program (no data file) to build a GUI where a user would enter the values of P, I, and N into controls, and your program would compute and display A in another control. You must use an object just as you did in Lab 2 to hold the values of P, I and N, and to compute A.  You should be able to use the methods of your original banking object, and just call on them from other places in your code.

 

What You Need To Know - How to integrate a user class within the MFC software architecture.

 

Due - 10/9

 


Last updated by DrB on Thursday April 19, 2007 01:25 PM -0400