Programming Projects

 

 

Project # HLL1:

 

A.   Using either C, C++, or Java, write a program which repeatedly offers the choice to convert

·         unsigned Hex to Dec or unsigned Dec to Hex                                                     Due: 26 Sept 2013

            DO NOT USE the

o   stream filters “hex” and “dec

nor

o   the scanf and printf methods with the descriptors %d and %x.

 

·         signed Hex to Dec or signed Dec to Hex                                                               Due: 1 Oct 2013

 

o   Hint1: Sign & Magnitude Decimal to Two’s Complement Hexadecimal

Input  -11510

Since number is less than zero, set Boolean variable negsign = TRUE

Convert 11510 to 7316

Since negsign == TRUE subtract 7316 from 10016 yielding 8D16           

                                                Notice:           8D16

7316

   1) 0016

 

o   Hint2: 2’s Complement Hexadecimal to Sign & Magnitude Decimal

Input 8D16

Since first character is in set {8, 9, A, … , F} Set Boolean variable negsign = TRUE

Since negsign == TRUE subtract 8D16 from 10016 yielding 7316

Convert 7316 to 11510

Since negsign == TRUE, output negative sign followed by 11510                       

 

 

Project # HLL2: Read Chapter 2, with special attention to                                                                  

·         the run-time stacks as discussed in 2.3 & 2.4

·         and recursion as discussed in 2.4

1.    Implement the Binomial Coefficient recursive function (page 62) and use it to generate a specified number of levels of Pascal’s Triangle.

2.    Study the run-time stacks on page 65 in detail, i.e., follow the program and the discussion in the textbook to see how the stacks are built and deconstructed. Study the tree structure on pages 66-67 and the calling structure on the same page. 

3.    Use the binCoeffTrace program to study the growth and demise of the stack.            Due: 8 Oct 2013

 

 

Project #3           page 84                     problem 15                                                   Due: 8 Oct 2013

Project #4           page 187                   problems 12, 13, 14, 15, 16                       Due: 15 Oct 2013

Project #5           pages 233-236         problems 20, 21, 22, 23, 27, 30, 31          Due 22 Nov 2013

 


Project #6a         pages 321-322         problems 11, 13, 15, 16                             Due 27 Nov 2012

Project #6b         pages 323-324         problems 18, 20a & 20b, 21, 24               Due 4 Dec 2012

Project #6c         pages 325-329         problems 27                                                 Due 4 Dec 2012

 

EXTRA CREDIT

Project #6d         pages 325-329         problems 29, 34, 37, 39                             Due 4 Dec 2012