ÿþ<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=iso-8859-2"> <meta name="description" content="Informacje dla Studentów"> <meta name="author" content="RafaB KieBbik"> <meta name="language" content="pl"> <meta http-equiv="pragma" content="no-cache"> <title>RafaB KieBbik &ndash; Information for Students</title> <!-- <link rel="stylesheet" type="text/css" href="/style.css"> --> <link rel="shortcut icon" type="image/gif" href="graphics/icon.gif" title="icon" /> <link rel='stylesheet' href='css/structure.css' type='text/css' /> <link rel='stylesheet' href='css/text.css' type='text/css' /> <link rel='stylesheet' href='css/forms.css' type='text/css' /> <link rel="stylesheet" href="css/menu.css" type="text/css" /> <link rel="stylesheet" href="css/tables.css" type="text/css" /> <script type='text/javascript'> function bezpiecznaPoczta(nazwa, domena) { locationstring = "mailto:" + nazwa + "@" + domena; window.location = locationstring; } </script> </head> <body class="Layout"> <div class="Container"> <div class="p"> <br> <h1>dr in|. RafaB KieBbik</h1> <p><b><a href='http://www.dmcs.p.lodz.pl'>Department of Microelectronics and Computer Science</a></b> <h3>MATERIALS for LABORATORY on OOPC</h3> <br> <b>Current results:</b> <a href='https://docs.google.com/spreadsheet/ccc?key=0AhkNRY-3goyBdG9nQTExSkNHcXdpb0duVzBUcjcwUUE'> Monday 10:12 & 12:14</a> <!-- <b>Current results:</b> <a href='oopc/oopc_pon_10_12.pdf'> Monday 10:12</a> <a href='oopc/oopc_pon_12_14.pdf'> Monday 12:14</a> --> <br> <br><h2>Tasks to be performed</h2> <b>Task 1 - Stack</b> (2 hours - 5 points) <br><b>A. </b> Using pure C (not C++) implement the stack for the interface presented in file <a href='oopc/task_1/int_stack.h'> int_stack.h </a>. <br><b>B. </b> Implement the similar stack based on classes in C++. <br>In both cases allocate the memory dynamically. Verify your program against the memory leaks (use valgrind). Prove the correctnes of your codes by means of appropriate demonstrations. <br> <br> <b>Task 2 - List</b> (2 hours - 5 points) <br>Optimize the assignment operator in the list class (last lecture example), so it does not unnecessarily free nor allocate memory. <br> <br> <b>Task 3 - Complex Numbers</b> (2 hours - 10 points) <br>Write and demonstrate the usage of class implementing complex numbers. Overload basic operators (+,-,*,/,+=,-=,*=,/=,==,<<). Write functions returning the real and the imaginative part, the amplitude, the phase and the conjugate of the complex number. <br> <br> <b>Task 4 - Polynomials</b> (4 hours - 15 points) <br>Write the class implementing polynomials, appropriate for the usage in the example presented in file <a href='oopc/task_4/testpoly.cpp'> testpoly.cpp </a> <br> <br> <b>Task 5 - Matrix</b> (4 hours - 20 points) <br>Write the class implementing matrices with the reference counting, appropriate for the usage in the example presented in file <a href='oopc/task_5/test_matrix_rc.cpp'> test_matrix_rc.cpp </a>. As the file required in main() function use <a href='oopc/task_5/matrix.dat'> matrix.dat</a>. Consider possible modifications of main() function causing the exceptions specified in it. <br> <br> <b>Task 6 - Template</b> (4 hours - 10 points) <br>Write the template of associative container class "map_template" and the "Employee" class representing employee personal data, appropriate for the usage in the example presented in file <a href='oopc/task_6/testmap.cpp'> testmap.cpp </a>. Demonstrate also the possible usage of such container for database storing books in the library, where the key is the title of the book and the value objects store the information about the author, category, number of pages, status (on the bookshelf / borrowed), etc.. <br> <br> <b>Task 7 - Gdb</b> (2 hours - 5 points) <br>Perform all the steps of the GDB tutorial included in file <a href='oopc/task_7/gdb_tutorial.tar.gz'> gdb_tutorial.tar.gz </a>. <br> <br> <b>Task 8 - Game</b> (8 hours - 45 points) <br>Write your own version of popular computer game Pacman (see the <a href='oopc/task_8/screen_shot.jpg'> screen shot </a>). <br> <br> Provide the following functionality: <br> - One graphic object - representing the player - is controlled by the keyboard <br> - Four graphic objects - representing the enemies - are controlled automatically by the computer <br> - There are two kinds of objects to be collected by the player: <br> a. simple objects increasing the score of the player <br> b. special objects increasing the score of the player (by the value greater than in case of simple objects) and modifying the status of the player in the following way: when the special object has been collected, the player can catch the enemies for a certain period of time. Otherwise the enemies can catch the player. <br> <br> Inherit the graphic object classes from one base class allowing to store them in one container. Use the virtual functions to update the properties and the view of appropriate graphic objects. <br> <br> <br><br><br><br><script language="JavaScript" type="text/JavaScript"> <!-- document.write("Last actualization: " + document.lastModified); //--> </script> <br> <br> <br> <br> <br> <br> </body> </html> <!--ISO-->