1 CSC111H Introduction Dennis Burford [email protected] dburford/csc111h

23
1 CSC111H Introduction Dennis Burford [email protected] http://www.cs.uct.ac.za/ ~dburford/csc111h/

Transcript of 1 CSC111H Introduction Dennis Burford [email protected] dburford/csc111h

Page 1: 1 CSC111H Introduction Dennis Burford dburford@cs.uct.ac.za dburford/csc111h

1

CSC111H Introduction

Dennis Burford

[email protected]

http://www.cs.uct.ac.za/~dburford/csc111h/

Page 2: 1 CSC111H Introduction Dennis Burford dburford@cs.uct.ac.za dburford/csc111h

2

CSC111H:

Continuation of CSC110H, designed for students who plan to complete BSc degree in 4 years rather than 3 years. CSC110H and CSC111H form part of the Academic Development Programme of the Science Faculty. Note: CSC111H joins CSC116S in second semester.

Lectures:

1st Semester: 4th period, Mon to Wed, Thur used for lab in Scilab.

Venue: Leslie Social Science LT 2C.

2nd Semester: 4th period, Mon to Fri, Venue to be announced.

Page 3: 1 CSC111H Introduction Dennis Burford dburford@cs.uct.ac.za dburford/csc111h

3

Prescribed Books:

First Semester and Second Semester:

“Programming and Problem Solving with JAVA”, by James M. Slack.

Second Semester only (recommended):

“Structured Computer Organization”, 4th Ed., Andrew S. Tanenbaum (Prescribed in CS2).

Other notes (including assignments) available on Course web pages.

Page 4: 1 CSC111H Introduction Dennis Burford dburford@cs.uct.ac.za dburford/csc111h

4

Syllabus:

Work in first semester mostly based on a project, done in pairs. Syllabus includes:

• Graphical User Interfaces in Java• More on Java: Client-Server, Exceptions, Input/Output, Recursion• Project Design & Development: The Software Development

Lifecycle, Planning, Object-Oriented Design, User Interface Design, Testing, Documentation.

• Number Systems• Overview of some Computer Science topics: Networks, Databases. Second semester syllabus provided later.

Page 5: 1 CSC111H Introduction Dennis Burford dburford@cs.uct.ac.za dburford/csc111h

5

Practical Assignments:

• Mon (6th – 7th or 8th – 9th ): Assigned to tutorial group and meet tutor before going to lab. Should need further time in the lab to complete work (arrange in own time).

• Assignments on web. Note: Late assignments will not be marked.

• Extensions only granted with valid medical certificate signed by qualified medical doctor (departmental secretary, room 317) or compassionate grounds (see Katherine Malan, room 308).

Page 6: 1 CSC111H Introduction Dennis Burford dburford@cs.uct.ac.za dburford/csc111h

6

Class Tests:

• Five formal class tests.

• In addition, test written during June exam Period.

• Practical test in second semester.

Test 1 Wed 13 March 4th period Jameson Hall Test 2 Wed 10 April 4th period Jameson Hall Test 3 (116 Test 1) Thurs 1 August 4th period To be announced Test 4 (116 Test 2) Wed 28 August 4th period To be announced Test 5 (116 Test 3) Wed 2 October 4th period To be announced

Page 7: 1 CSC111H Introduction Dennis Burford dburford@cs.uct.ac.za dburford/csc111h

7

Medicals:

• Miss a test on medical grounds, will be required to do oral test when you return to health.

• Lecturer will ask questions to determine how well you understand the work.

• Assigned a mark for the test based on this oral.

Page 8: 1 CSC111H Introduction Dennis Burford dburford@cs.uct.ac.za dburford/csc111h

8

DP Requirement:

DP (Duly Performed) required before final examination. Require:

1. Average of at least 50% in practical programming exercises and practical test (last programming exercise excluded from calculation, but included in course assessment)

2. Average of at least 40% in class tests and June test .

Page 9: 1 CSC111H Introduction Dennis Burford dburford@cs.uct.ac.za dburford/csc111h

9

Final Mark:

Calculated using following weightings:

• Practicals 15% (1st semester 5%, 2nd semester 10%)

• Practical Test 15%

• Class Tests 20% (1–5 count 3% each; June 5%)

• Final Nov. Exam 50%

 

To pass, must have at least:

• 50% for final mark

• 50% average for (practical assignments and practical test)

• 45% average for (class tests and the exam)

Page 10: 1 CSC111H Introduction Dennis Burford dburford@cs.uct.ac.za dburford/csc111h

10

Java Quiz I

Page 11: 1 CSC111H Introduction Dennis Burford dburford@cs.uct.ac.za dburford/csc111h

11

Java Quiz I

• What does it mean to say: Java is platform independent? How is this done?

• What is the difference between a primitive data type and a class?

• Can you explain each of the components in the following statement?:System.out.println("Hello World");

• Can you name two methods of java.lang.String ? 

• How would you find this information?

Page 12: 1 CSC111H Introduction Dennis Burford dburford@cs.uct.ac.za dburford/csc111h

12

Java Quiz II

1. What is a constructor?

2. What is meant by overloading?

3. What are wrapper classes?  Give examples.

4. What’s the difference between extends and implements?

Page 13: 1 CSC111H Introduction Dennis Burford dburford@cs.uct.ac.za dburford/csc111h

13

Java Quiz III

public class QuizIII{

public static void main( String [] args ){

int i;int [] a = new int[10];String temp = "";

for ( i=0; i<10; i++ )a[i] = i * i;

for( i=0; i<10; i++ )temp += (i%2==0) ? String.valueOf( a[i] ) : "-";

System.out.println( temp );}

}

Page 14: 1 CSC111H Introduction Dennis Burford dburford@cs.uct.ac.za dburford/csc111h

14

Java Quiz III

public class QuizIII{

public static void main( String [] args ){

int i;int [] a = new int[10];String temp = "";

for ( i=0; i<10; i++ )a[i] = i * i;

for( i=0; i<10; i++ )temp += (i%2==0) ? String.valueOf( a[i] ) : "-";

System.out.println( temp );}

}

Page 15: 1 CSC111H Introduction Dennis Burford dburford@cs.uct.ac.za dburford/csc111h

15

Java Quiz III

public class QuizIII{

public static void main( String [] args ){

int i;

int [] a = new int[10];String temp = "";

for ( i=0; i<10; i++ )a[i] = i * i;

for( i=0; i<10; i++ )temp += (i%2==0) ? String.valueOf( a[i] ) : "-";

System.out.println( temp );}

}

Page 16: 1 CSC111H Introduction Dennis Burford dburford@cs.uct.ac.za dburford/csc111h

16

Java Quiz III

public class QuizIII{

public static void main( String [] args ){

int i;int [] a = new int[10];String temp = "";

for ( i=0; i<10; i++ )a[i] = i * i;

for( i=0; i<10; i++ )temp += (i%2==0) ? String.valueOf( a[i] ) : "-";

System.out.println( temp );}

}

Page 17: 1 CSC111H Introduction Dennis Burford dburford@cs.uct.ac.za dburford/csc111h

17

Java Quiz III

public class QuizIII{

public static void main( String [] args ){

int i;int [] a = new int[10];String temp = "";

for ( i=0; i<10; i++ )a[i] = i * i;

for( i=0; i<10; i++ )

temp += (i%2==0) ? String.valueOf( a[i] ) : "-";

System.out.println( temp );}

}

Page 18: 1 CSC111H Introduction Dennis Burford dburford@cs.uct.ac.za dburford/csc111h

18

public class QuizIII{

public static void main( String [] args ){

int i;int [] a = new int[10];String temp = "";

for ( i=0; i<10; i++ )a[i] = i * i;

for( i=0; i<10; i++ )

temp += (i%2==0) ? String.valueOf( a[i] ) : "-";

System.out.println( temp );}

}

Java Quiz III

(cond)? (if-true):(if-false)

Page 19: 1 CSC111H Introduction Dennis Burford dburford@cs.uct.ac.za dburford/csc111h

19

Java Quiz III

public class QuizIII{

public static void main( String [] args ){

int i;int [] a = new int[10];String temp = "";

for ( i=0; i<10; i++ )a[i] = i * i;

for( i=0; i<10; i++ )

temp += (i%2==0) ? String.valueOf( a[i] ) : "-";

System.out.println( temp );}

}

Page 20: 1 CSC111H Introduction Dennis Burford dburford@cs.uct.ac.za dburford/csc111h

20

Java Quiz III

public class QuizIII{

public static void main( String [] args ){

int i;int [] a = new int[10];String temp = "";

for ( i=0; i<10; i++ )a[i] = i * i;

for( i=0; i<10; i++ )

temp += (i%2==0) ? String.valueOf( a[i] ) : "-";

System.out.println( temp );}

}

Page 21: 1 CSC111H Introduction Dennis Burford dburford@cs.uct.ac.za dburford/csc111h

21

Java Quiz III

public class QuizIII{

public static void main( String [] args ){

int i;int [] a = new int[10];String temp = "";

for ( i=0; i<10; i++ )a[i] = i * i;

for( i=0; i<10; i++ )

temp += (i%2==0) ? String.valueOf( a[i] ) : "-";

System.out.println( temp );}

}

Page 22: 1 CSC111H Introduction Dennis Burford dburford@cs.uct.ac.za dburford/csc111h

22

Java Quiz III

public class QuizIII{

public static void main( String [] args ){

int i;int [] a = new int[10];String temp = "";

for ( i=0; i<10; i++ )a[i] = i * i;

for( i=0; i<10; i++ )temp += (i%2==0) ? String.valueOf( a[i] ) : "-";

System.out.println( temp );}

}

Page 23: 1 CSC111H Introduction Dennis Burford dburford@cs.uct.ac.za dburford/csc111h

23

Java Quiz III

public class QuizIII{

public static void main( String [] args ){

int i;int [] a = new int[10];String temp = "";

for ( i=0; i<10; i++ )a[i] = i * i;

for( i=0; i<10; i++ )temp += (i%2==0) ? String.valueOf( a[i] ) : "-";

System.out.println( temp );}

}

0-4-16-36-64-