% Introduction to Software Lab
% Teague Sterling & Gurgen Tumanyan
% Week 0 — Spring 2010
Course Information
==================
- Computer Science 211: **Introduction to Software Lab**
- Schedule Number: **13120** (*Who needs to add?*)
- Two Units. Credit/No Credit only
- Class every **Wednesday 2PM – 4PM**
*Your grade is based solely on attendance — Tell us in advance if you have to miss class!*
- **NO HOMEWORK**
Instructors
===========
- **Gurgen Tumanyan** [tumanyan@gmail.com](mailto:tumanyan@gmail.com)
Office hours: T.B.A.
- **Teague Sterling** [teague@sfsu.edu](mailto:teague@sfsu.edu)
Office hours: After class (Wednesday, 5PM - 6PM)
Office: SCI 252 (Next to Comptuer Science Under Grad. Lab)
Course Structure
================
- Two hour per Week Course
- Typical Class:
- **Beginning of Class**
- Attendance and quick questions.
- **Lecture**
- Review and expand on materials covered in CSC 210.
- Sometimes we will introduce new concepts (Nothing too crazy).
- **Project Work**
- A short project focusing on the topics discussed.
- Feel free to do *Computer Science* homework instead.
- **Questions**
- Don't hesitate to ask about homework & projects for other CS classes.
That's what we're here for.
Requisite Software
==================
- Need a compiler to create C++ programs
- We recommend [NetBeans](http://netbeans.org/downloads/)
- Other options:
- [Dev C++](http://www.bloodshed.net/devcpp.html) (Windows)
- [Xcode](http://developer.apple.com/tools/xcode/) (OS X)
- g++
- Linux/Unix: Should be pre-installed
- Windows: Via [Cygwin](http://www.cygwin.com/)
- Mac: Comes with [Xcode](http://developer.apple.com/tools/xcode/)
If you use g++ you will need a text editor. Lots of things better than Notepad.
- Visual Studio (Windows) — Need MSDN Academic Alliance access from teacher
Getting Started with Netbeans
=============================
1. [Download Netbeans](http://netbeans.org/downloads/)
2. Install Netbeans
3. Run Netbeans
That was easy. No? Here's a [step-by-step video](http://youtube.com) just in case.
Makin' Programs
===============
- Computer programs are written in simple text (source code) files.
- **Source files** are compiled into runnable programs.
- As programs grow, they span across many files.
- To stay organized (and maintain sanity), we can create **projects**.
Projects are not at all required, but will make your life easier later on.
Creating a Project
==================
1. Click *"File"* » *"New Project"*
2. Select *"C/C++"* under *"Categories"* and *"C/C++ Application"* under *"Projects"*. Click Next
3. Give the Project a unique name. Let's call it "HelloCSC211"
4. Change the Project location if you feel so inclined
5. Make sure *"Create Main File"* is checked with *"C++"* selected in the drop-down menu.
6. Click *"Finish"*
Working with Projects
=====================
- Your *"HelloCSC211"* project should be open now, if it isnt' open it with the *"File"* menu.
- Find the *"Source Files"* tree on the left side of the window; expand it.
- Open the *"main.cpp"* file.
- You now see source code. **Pay no attention to it!**
- *ERASE EVERYTHING IN THE TEXT EDITOR!*
- **Last but not least:** Don't get scared when you see the next slide...
Writing Your First Program
===========================
Type the following in the text editor:
/* Project: HelloCSC211
* File: main.cpp
* Author:
* Created: January 27, 2010 2:30 PM
*/
#include
using namespace std;
int main () {
cout << "Hello, World!" << endl;
return 0;
}
Compiling Your First Program
============================
- If that was scary, take a breath.
- Save your project using the *"Save All Files"* icon, or just press Control-S
- Look for the *"Run Project"* Icon. It looks like a little green play button.
- Now click it.
- Your program should pop up and greet you.
You're Done
===========
- That's all we wanted you to do today. Just write a computer program, no Biggie.
- **Go home now**. See you all next week.
- Or go on for other methods of compiling
Using g++
===========
Still gotta type this. Too tired to go on.