CSIS3150/01 Programming Languages

 

Deadline for CSIS3150 Assignment 3 will be postponed to 04/14/2008

Review (3/31) and Exam 2 (4/2)

Course Syllabus

 

Textbook and Resources

 

Accelerated C++, Practical Programming by Example, by Andrew Koenig and Barbara Moo. Addison Wesley. First Edition, ISBN #: 0-201-70353-X.

 

Instructor

 

Dr. Yong Shi

Office: Clendenin Building 3041

Phone: (770)423-6423

Email: yshi5@kennesaw.edu

 

Chapter 0                               (slides)

Chapter 1                               (slides)

Chapter 2                               (slides)

Chapter 3                               (slides)

Chapter 4                               (slides)

Chapter 5                               (slides)

Chapter 6                               (slides)

Chapter 7                               (slides)

Chapter 8                               (slides)

 

 

Lab sessions (CL 2009)

   Xming  http://www.straightrunning.com/XmingNotes/

      Xming is the leading free unlimited X Window server for Microsoft Windows. It is fully featured, small and fast, simple        to install and being standalone native Windows, easily transported portable. No dependency on any external packages, including Cygwin!

    SSH   

Download1(Xming)

Download2(SSH)

 

Setup steps and commands (how to set up your account in lab, at home, and those commands used on the server)

 

Download3(Dev C++)

 

Lab session on Jan 16

  1. Try to define two functions:

int f1(int i)

double f2(double i)

And in your main function, define

int aa = 10;

double bb = 10.1;

Then try the following:

1)     f2(aa);

2)     f1(bb);

3)     int aaa = f2(aa)

4)     double bbb = f1(bb);

To see what will happen when you compile and run your codes

  1. 0-2
  2. 0-4

Lab session on Jan 23

1.     Given a number n, try to calculate the sum from 0 to n in both recursive and non-recursive way

2.     Try to define the same variable ¡°int i = 10;¡± in two { } pairs to see what C++ compiler¡¯s reaction is

 

 

Lab session on Jan 30

1.     P16 1-6

2.     P34 2-1

3.     P34 2-7

4.     P34 2-8

5.     Output Sunday ¨C Saturday based on the input 0 ¨C 6

For example, when user inputs 4, your program should output ¡°Thursday¡±

 

Lab session on Feb 6

 

1. Output max and min of the input (a group of data, either integers, or doubles)
    2. Output the ordered list of the input (with duplicate values, either integers, or doubles)
    3. Output the median of the input (a group of integers)
    4. Try to use cin.get(), cin.peek(), or cin.getline() to solve to problem in question 1-6

 

Lab session on Feb 20

 

1. Draw hexagon based on the size input by the user

 

Lab session on Feb 27

 

1. Generate multiple source files.

    In the main file calculate.cpp, read from the output two numbers

    Call function mymax in max.h and max.cpp to get the max of the two numbers

    Call function mymin in min.h and min.cpp to get the min of the two numbers
    2. Try the last question in the test
    3. Assignment 2

 

Lab session on March 12

 

1.     P73 4-2

2.     P73 4-6

 

Lab session on March 19

 

1.     Define a vector<int> and a list<int>,

2.     Insert same numbers

3.     Do erase function for both of them, see the time spent

 

Lab session on March 26

 

1.     suppose vector a1 contains: [4 4 2 3 5 5], vector a5 contains: [1 2 3]

What is the content of a5 if we do

copy(a5.begin(),a5.end(), a1.begin());

2.     suppose vector a1 contains: [1 2 3 3 5 5 3]

What is the content of a1 if we do

remove(a1.begin(),a1.end(),3);

3.     P122 6-3

4.     P122 6-4

5.     P122 6-9

 

 

Lab session on April 8

 

1.  P138 7-1

2.  Given a sequence of distinct integers in ascending order (except 1), group them with multiple relationship

     For example, if the input is:   2 3 6 8 10 12 15

                    Output should be:   2 can divide 6, 8, 10, and 12

                                                3 can divide 6, 12, and 15

 

 

Lab session on April 16

 

1.  write generic functions average, min and max for numeric vectors

 

Lab session on April 23

 

1.     Use the map class to write a program which reads the pairs of (student, class) from the user and output the classes each student takes.

For example, if the user inputs:

Mary  database

Peter networking

John  architecture

Mary networking

Peter architecture

 

The output should be:

John takes architecture

Mary takes database and networking

Peter takes networking and architecture

2.     write a generic function to accept a vector, and output the size of the vector.

 

NOTICE: the submission email is yshi04@gmail.com

Cover Sheet for the assignments

Assignment 1 (Due date Feb 18)

Assignment 2 (Due date March 10)

Assignment 3 (Due date April 14)