BuCS 238 Computer Programming II

Class Assignments


> Final Exam : ADT Set due Tue, 7 May 2024 at 2:50pm
      Implement ADT Set using the explicit representation method (Chapter 9.4 Sets).
      Your universal set is { 0,1,2,3,4,5,6,7,8,9 }, so no mapping function is needed.
      Your project should be called Set (provided in H:\CP2) and Set.zip.
      Create setType.h and setDr.cpp to test your program. Note that setType.cpp in included in setType.h
      You are NOT expected to use file input or output on this program.
      The output in setDr.cpp should be commented and should completely test each set method or function.
      The output on the screen should be commented and should completely test each set method or function.
      This assignment is to be completed with NO OUTSIDE ASSISTANCE other than from your instructor.
	Testing Union
	Set 1             : { 0 1 }
	Set 2             : { 2 3 }
	Set 1 union Set 2 : { 0 1 2 3 } 
      Extra credit:
      Implement map.h and SetType.h to store the set { A..Z } and test using a different driver file.
      You will also have to create a new Print method with a different name.
      If you try the extra credit problem after finishing the first problem, create a new project called SetExtra.

> Assignment 7 REDO : Fibonnaci - due Mon, 22 Apr 2024

> Assignment 6 REDO : Assign6_QueueLL_Circ - due Mon, 22 Apr 2024.

> Assignment 7 (Chapter 7 Exercises #13a,c) : Fibonnaci - due Mon, 15 Apr 2024
     This is a short recursion assignment due in ONE week.
     Use the factorial function and driver as a guide to writing this program.
     No algorithm required since the problem outline is in the text.
     Note : The text has an error. The correct Fibonacci sequence is: 0 1 1 2 3 5 8 13 21 34 55 89 ...
     Bonus: Instead of just returning the Nth value, have the program print the sequence from Fib(0)to Fib(N).

> Assignment 6 : Implement Ch5_QueueLL as a circular linked list due Mon, 8 Apr 2024.
      Your project should be named Assign6_QueueLL_Circ and is provided for you.
      The project currently contains the Ch5_QueueLL code.
      You need to remove front as a private variable and access front using rear->next.
      Change the class, methods and driver as appropriate and test.
      Helpful hint: Code for Print
      Helpful hint: Start in.txt with only Quit, then add test items as you implement them.
      Helpful hint: Don't be afraid to draw your code line by line or use Jamboard!

> Assignment 5 REDO : Files - due Mon, 1 Apr 2024

> Assignment 5 : Files - due Mon, 25 Mar 2024
     This assignment is in your CP2 folder in the Files project.
     The instructions are in the files.cpp main program file.

> Assignment 4 REDO : Sudoku2 - due Wed, 20 Mar 2024

> Assignment 4 : Sudoku2 due Mon, 4 Mar 2024
     Add MakeEmpty() to ADT Unsorted List and test to make sure it works.
     Try adding duplicate values to an unsorted list to see what happens.
         Suggestion: Add your MakeEmpty test and duplicate values test to listtest.cpp
     Copy your Sudoku files into the Sudoku2 folder and add them to your project.
     Add ADT Unsorted List to your Sudoku2 project and change ItemType so it stores characters.
         Note: itemtype.h, itemtype.cpp, unsorted.h and unsorted.cpp have been added to your project.
     Create checkSudoku(table) which returns true or false depending on if table is a valid Sudoku.
         You only need to write an algorithm for checkSudoku(table).
         Use Unsorted List to determine whether a Sudoku puzzle has been correctly solved.
         Note: This means that values 1 – 9 appear in each column and row only once.
         Note: You don't need to check squares. If you can do it, it will be worth extra credit.
     Output the Sudoku to the screen and to a file.
     Suggestion: Don't worry about file output until after you get it working to screen.
     Output the results of your row and column tests to screen.
     Output either “VALID Sudoku” or “INVALID Sudoku” to screen and to a file.
     Include a test plan and execute your test plan.

> Assignment 3 REDO : TwoNum - due Mon, 26 Feb 2024

> Assignment 3 : TwoNum Class due Mon, 19 Feb 2024
     Write a class called TwoNum which stores two integer numbers.
     The project should be called "TwoNum".
     The class file names should be "twonum.h" and "twonum.cpp".
     Create a default constructor which initializes both numbers to zero.
     Create a parameterized constructor which allows you to set the numbers during object creation.
     Create a class method named GetNum1 which returns the first number.
     Create a class method named GetNum2 which returns the second number.
     Create a class method named GetNumbers which returns both numbers to the user in any order.
     Create a class method named Sum which returns the total of the two numbers.
     Create a class method named Set which allows the user to change both numbers at once.
     Note that twonum.cpp should not contain any cout statements.
     Any output (cout) statements should be in your test driver.
     Create a test driver named "twonumDr.cpp" to test all the features of your new class.
     A good example to use would be time.h and time.cpp from OOP_Example.
     A good example of pre- and postconditions would be unsorted.h
     Comment twonum.h in the same style as unsorted.h
     Good examples of the driver file would be "oop_example.cpp" or "listtest.cpp"
     Be sure to comment your test driver file. The comments will be your test plan."
     You are not expected to input or output using files in this assignment.

> Assignment 2 REDO : Sudoku - due Mon, 12 Feb 2024

> Assignment 2 : Sudoku - due Mon, 5 Feb 2024

> Assignment 1 REDO : Package - due Mon, 29 Jan 2024

> Assignment 1 : Package - due Mon, 22 Jan 2024

> Assignment 0 : GasPrice (will be completed during class) -->


This page maintained by bobh@hesston.edu