CSE1502 - Introduction to Software Development with C++

Matt Mahoney
Fall 2008
http://cs.fit.edu/~mmahoney/cse1502/

Tentative - subject to change prior to start of classes.

Schedule

Aug 18 through Dec. 3, 2008 on Mon., Wed., and Fri. Olin room EC 127-128 (combined rooms). No classes on Sept. 1, Oct. 13-14, Nov. 11, Nov. 26-28. There are 3 or 4 sections at different times, each with a different instructor. The following schedule will probably change:

It is possible that the 3PM section will be cancelled, in which case I may teach the 1PM or 2PM section.

Help Desk Schedule in room EC272.

Each instructor will have their own syllabus, homework assignments, exams, and grading policy. This syllabus applies only to Matt Mahoney's section.

Textbook

Engineering Problem Solving with C++ 2nd Ed. by Delores M. Etter and Jeanine A. Ingber, Pearson/Prentice Hall. ISBN 978-0-13-602071-4. (All sections will use this book). Also read the tutorial and Introduction to C++.

Mailing list

All students are expected to join the CSE 1502 mailing list. You are responsible for material posted to this list by instructors. You are also encouraged to post questions or answers about your homework or about C++ in general here, because other students might have the same questions.

To post a message, send email to cse1502@lists.fit.edu. When replying to a post, remember to check the "to" address before sending, depending on whether you want to reply to the sender or the whole class. Please do not post your homework to the list.

Grading policy

Exams (50% of grade)

Your exam grade is the average of the best three grades after dropping the lowest grade. There are no makeup exams for any reason. All exams are weighted equally. If you miss an exam (including the final), then that is your drop. All exams are open book and open notes, but no computers or electronic devices are allowed.

Fall 2006 exams
Exam 3
Final exam

Spring 2007 exams
Exam 1
Exam 2
Exam 3
Final

Fall 2007 exams
Exam 1
Exam 2
Exam 3
Final

Spring 2008 exams
Exam 1
Exam 2
Exam 3
Final

Homework (50% of grade)

Homework assignments will be programming assignments graded manually for correct design, function, documentation, and neatness. Partial credit is given based on my subjective opinion of how well you understand and describe the problem in comments (the specification), your approach (design), and testing (whether it works or gives appropriate error messages for unusual or unexpected inputs). Grading depends on human readability as well as machine readability. Code should be indented using the style in the book. Major sections should be commented. Variable names should be self documenting or their purpose should be commented as appropriate. Your homework should include your name and email address in the comments.

Homework must be submitted by email by midnight of the due date. Late assignments are penalized 20% per day. I encourage you to submit homework early for me to comment on, and submit revised versions later without penalty. I will grade only the best version.

You must cite all sources of outside help in your comments, including help received from other students or the Internet. Copying code or allowing your code to be copied is not allowed. Group assignments are not allowed. You are expected to know the CS department policy on academic honesty. Penalties for cheating can range from a zero on the assignment to expulsion from the university. I report incidents of cheating to the department head.

Final grade = (average of top 3 exams)/2 + (total of homework grades)/2.
90-100=A, 80-89=B, 70-79=C, 60-69=D, 0-59=F.

Fall 2006 syllabus
Spring 2007 syllabus
Fall 2007 syllabus
Spring 2008 syllabus

Compiler

You will need a C++ compiler for your home computer. You may use any standard ANSI C++ (released since 1999) compiler under any operating system (Windows, UNIX, Linux, Mac). I recommend (but don't require) MinGW g++ for Windows or GNU g++ for other operating systems. All of the following are free under Windows:

MinGW g++. This runs from a command window only. Download and run the installer (MinGW_Toolbox_Setup.exe, 23 MB). Add C:\mingw\bin to your PATH. In Vista, you may also have to copy the file cc1plus.exe from c:\mingw\libexec\gcc\mingw32\3.4.5 to c:\mingw\bin.

Visual Studio 2005 Pro or Standard. You will need a TRACKS account and be registered for this class to download it. This has a GUI and lots of features. The Pro version download is 2.8 GB (DVD image). Not recommended for older machines or slower connections. To install, download the 4 .rar files, unrar e *.rar, then burn a DVD from the .iso file or use the provided program to mount the .iso to disk and run vs\autorun.exe as administrator.

Borland C++ 5.5. This runs from a command window only. Works on old machines. Click on "compiler", register, and download the installer (8.7 MB). After installing, add C:\Borland\BCC55\bin to your PATH and create the file C:\Borland\BCC55\bcc32.cfg exactly as shown below:

-I"c:\Borland\Bcc55\include"
-L"c:\Borland\Bcc55\lib"

Digital Mars C++ Compiler 8.49. This runs from a command window only. Works on old machines. Unzip stlport.zip (2 MB) and dm849c.zip (3 MB) in C:\ to install in C:\dm and add C:\dm\bin to your PATH.

Be sure to test your compiler by writing a simple program, compiling, and running it, e.g.

// Paste this file into notepad and save as hello.cpp
// To compile from a command window:
//   MinGW:   g++ -Wall hello.cpp -o hello.exe
//   Borland: bcc32 hello.cpp
//   Mars:    dmc hello.cpp -IC:\dm\stlport\stlport
// To run: hello
//
// In Visual Studio: create new project, select Win32 console application, 
//   uncheck "precompiled headers", delete the supplied code, replace with this code
//   and click Build project, Debug/Start debugging.
//
#include <iostream>
using namespace std;
int main()
{
  cout << "Hello world\n";
  return 0;
}

Homework #1

Due Wed. Sept. 3, midnight, 10 points. A projectile is fired at initial velocity v and angle theta from horizontal. You will write a program that inputs v (in meters per second) and theta (in degrees) and outputs the distance in both feet and meters to where the projectile lands. See figure below. Assume the surface is horizontal, that the acceleration of gravity is 9.8 m/s2, and neglect the effects of air resistance.

Be sure your program prompts the user to enter the two values. For example (user input shown in bold):

  Enter initial velocity in meters per second: 25.7
  Enter elevation angle (0 to 90 degrees): 64.5
  The projectile travels 52.3773 meters, or 171.841 feet.

The input and output does not have to be formatted exactly as shown, but should give the correct answers. Your program should include a specification (what are the inputs and outputs?) and your name in the comments. Email the source code file (.cpp file) to me as an attachment.