main
November 25th, 2024    

CISC 3110 4 0333 EWQ6
Main
Files
Syllabus
Links
Homeworks


Notes
0001

Files
econtacts.20100922
arraylist.20100927
objstuff.20101006
fileops.20101013
arrlist.20101110
arrlist.20101117
sdltest 20101124
sdltest stonehenge

Homeworks

HW1: Write a ``Hello World'' program. Obviously this homework isn't `just' about the hello world program. It's about setting up your unix (or linux) account/system, using vim to write the program (open "vim" and type up the hello world program, save), and compiling your program under unix (run g++ hello.cpp from command line). Email me this hello world program when you've completed these steps.


HW2: This homework has two parts: 1. Write a C++ program to read in 10 names (strings, not numbers) from standard input, store them in an array, sort them, and output the sorted list to standard output. Your program must use the pointer notation whenever it is refering to array indexes. 2. Setup your Brooklyn College unix account. Login, and create ~/public_html folder. Create an index.html file (with permissions, 644), that will contain your name, a link to any website you choose (use "a" tag), and an image (use "img" tag). Your website will have a URL of http://acc6.its.brooklyn.cuny.edu/~username/. Email me the C++ code from part1, and a link to your publically accessible website.


HW3: Download econtacts.20100922.zip, and add the "sort" function. It should function just like the "list" command, except output should be sorted ascending by name (case isensitive).


HW4: Download arraylist.20100927.zip, and add the "sort" function to the list class in econtacts file. The function will just sort the list, and nothing else. If anyone lists contacts afterwards they will be sorted in alphabetical order.


HW5: Write a program to work just like the unix "cal" utility. Your program will accept a month and year as command line arguments, and display the calendar for the month and year. Do not use any library functions (your program *can* figure out what calendar just by knowing the month and year). major hint: to calculate first week day of the year, using all integers:
int wday = (year + (year-1) / 4 - (year-1) / 100 + (year-1) / 400) % 7;


HW6: Download arrlist.20101110.zip, and add the "sort" function to the template class. Note that the code is working with an array of "T" objects (template), so your temporary swap variable needs to be of type "T".

HW7: This homework has multiple parts:

Create a class called ``Complex'', and put the class definition in complex.h, and the code for addition, subtraction, multiplication, and division into complex.cpp. You can find the definitions for how to do these operations on wikipedia (Complex_number).

Create a prog.cpp, which will have the "main" function---in your prog.cpp, you will ask user to enter two complex numbers, and your program will output their sum, difference, multiplication, and division.

Create a "Makefile" to build your project---first compile complex.cpp into complex.o, and prog.cpp into prog.o, and then link them together. Build the project via 'make' utility. A sample make file is in the code we did in class: arrlist.20101117.zip.

Setup SVN (subversion); import your project into SVN. Then check it out, zip it up, and submit that folder (e.g. the folder will have .svn directory). Read documentation on subvesion (google for it).





































© 2006, Particle