[Skip Navigation] [CSUSB] / [CNS] / [Comp Sci & Eng Dept] / [R J Botting] / [CSci202] / p1
[Text Version] [Syllabus] [Schedule] [Glossary] [Resources] [Grading] [Contact] [Question] [Search ]
Notes: [01] [02] [03] [04] [05] [06] [07] [08] [09] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20]
Labs: [01] [02] [03] [04] [05] [06] [07] [08] [09] [10]
Tue Apr 7 15:13:17 PDT 2009

Contents


    CS202 Project 1 Requirements

      Goals

      Your project should show your skill and knowledge in areas covered in the first 7 chapters of the book and especially either arrays or vectors.

      Choices

      Choose one single programming project from the list Chapter 7.10, 11, 12, 15, 17,20, 22..37.

      You may develop a program that uses either arrays or vectors as you wish.

      Note: the later prjects are more difficult but don't earn more points.

      Style

      Your code must have comments that identify you, the project in the book, and what you are doing!

      Make the code as simple and as clear as you can: Do the simplest thing that can possibly work first, and then use Don't repeat yourself to improve the code.

      I want to be able to read your code and know what it does, and what it should do! Comments should explain anything complicated or buggy.

      My grading method is described in the CSci202 syllabus.

      Hand in

      You must hand in a program that shows that you know the material in the first 7 chapters.

      Hand in the code. No cover sheets, folders, etc. No test runs. Print it out, staple it, and hand it in!

      Quizzes and Finals

      Don't be surprised if a test requires you to recall what you did when you wrote this project.

      Also See

      The CS202 syllabus has the rules, deadlines, and hints: [ syllabus.html ]

      Notes on each possible project

        7.10 Salesperson Data

        The information on each sales person must be taken from 'cin'. It is not enough to have a few salepeople in main().

        7.11 Basic Bubble Sort

        Input the test data of 10 numbers from the user using cin.

        7.12 Better Bubble Sort

        Include the previous project. Twice the work and get the same score:-)

        7.15 Output Unique Numbers

        The numbers come from cin. Make sure the program does not run off the end of the array by not reading more than 20 numbers.

        7.17 Rolling two dice

        Looks straightforward. Just get the size of the counting array correct...

        7.20 Airplane Seating

        Looks interesting. But interesting is a code word for not easy.

        7.21 DO NOT DO THIS ONE!

        7.22 Sales Slips

        Lots of detail.... avoid.

        7.23 Turtle Graphics

        Fun!

        7.24 Knight's Tour

        Avoid....

        7.25 Brute force knight's Tour

        Ugly.

        7.26 Eight Queens

        Another classic -- you need time to do lots of experiments and abandon some dead end ideas.

        7.27 Brute Force Eight Queens

        Same problem uglier solution. Recursion is so much better!

        7.28 Closed Knight's Tour

        See notes on Knight's Tour above.

        7.29 Eratosthenes Sieve

        It is only 2000 years old.... but still an interesting problem to solve. It will take time.

        7.30 Bucket Sort

        Given the RAM this is rather a nice algorithm.

        7.31 Recursive Selection Sort

        You have to write a special function that calls it self, of course. But recursion doen't make it harder. It is coding the logic.

        7.32 Recursive Palindome

        You have to write a special function that calls it self, of course. Easier than you might think, if you think recursively.

        7.33 Recursive linear search

        You have to write a special function that calls it self, of course. Seems a little like using an atomic bomb to crack a nut.

        7.34 Recursive Eight Queens

        The smart way to solve a recursive problem like this is to write a special function that calls it self, of course.

        7.35 Recursive Array Print

        Seems overly complex! By the way.... you new function
         		void printArray(int a[], int first, int last)
        must print a[first] and then the rest.... unless first >last.

        7.36 Recursive backwards Print

        This turns out to be the elegant way to do it!

        7.37 Recursive minimum

        You have to write a special function that calls it self, of course. Seems a little like using an atomic bomb to crack a nut.

    . . . . . . . . . ( end of section CS202 Project 1 Requirements) <<Contents | End>>

    Abbreviations

  1. Algorithm::=A precise description of a series of steps to attain a goal, [ Algorithm ] (Wikipedia).
  2. class::="A description of a set of similar objects that have similar data plus the functions needed to manipulate the data".
  3. Data_Structure::=A small data base.
  4. Function::programming=A selfcontained and named piece of program that knows how to do something.
  5. Gnu::="Gnu's Not Unix", a long running open source project that supplies a very popular and free C++ compiler.
  6. KDE::="Kommon Desktop Environment".
  7. object::="A little bit of knowledge -- some data and some know how", and instance of a class".
  8. OOP::="Object-Oriented Programming", Current paradigm for programming.
  9. Semantics::=Rules determining the meaning of correct statements in a language.
  10. SP::="Structured Programming", a previous paradigm for programming.
  11. STL::="The standard C++ library of classes and functions" -- also called the "Standard Template Library" because many of the classes and functions will work with any kind of data.
  12. Syntax::=The rules determining the correctness and structure of statements in a language, grammar.
  13. Q::software="A program I wrote to make software easier to develop",
  14. TBA::="To Be Announced", something I should do.
  15. TBD::="To Be Done", something you have to do.
  16. UML::="Unified Modeling Language".
  17. void::C++Keyword="Indicates a function that has no return".

End