Presentation is loading. Please wait.

Presentation is loading. Please wait.

Computer Science - I Course Introduction Computer Science Department Boston College Hao Jiang.

Similar presentations


Presentation on theme: "Computer Science - I Course Introduction Computer Science Department Boston College Hao Jiang."— Presentation transcript:

1 Computer Science - I Course Introduction Computer Science Department Boston College Hao Jiang

2 What is our class about?  In this class, you will learn Skills of solving problems using computers. Basic theories and concepts about computing and programming. programming a computer language – Java.  After the class, you will be confident of writing programs to solve real world problems (like math problems, image processing, visualization, graphics and building games …) Be ready for more advanced computer science classes.

3 About computer science  Computer science is to study principles and methodologies of solving problems with computational methods and computers. How to build “efficient software” that suits computers. How to represent, store, search, analyze and transform “information” or “data”.  Computing is everywhere! Finding the root of a high order polynomial equation. Finding the best driving path from one city to another. Graphics and computer games. Artificial intelligence, computer vision. Decide about how to invest money for different stocks.

4 Applications of computer science  A route planer You are here Your destination Road intersection

5 Applications of computer science  Robotics: How to a find route in a maze? entrance exit

6 Applications of computer science Image Processing

7 Applications of computer science  Computer graphics The tree looks quite complex. But in fact it can be generated with very few lines of code. Sakura (Cherry Blossom) by Priscilla Pham and Tom Wang

8 Applications of computer vision  Computer games Quake 2 Tetris

9 The basic problem solving method  Different real-world problems need different solution approaches. But in computer science, they usually follow some common steps: Problem abstraction and modeling. Developing algorithms to solve the problem. Software design. Coding. Testing.

10 Programming (coding)  Coding is the process of building a software.  The result is a package of computer programs that satisfy the design requirement.  Writing programs based on a given requirement is an important part of this class. (you will expect to write many programs in this class).  Coding is not just about writing a program that gives the right result. Good software is easy to use, maintain and extend.

11 A sample problem  Problem: Convert a positive integer number to its binary representation.  Examples: If the input is 9, the output will be 1001. Observation: the binary representation of n = the binary representation of (n/2) + (n%2) If n%2 == n, then its binary representation is n.

12 // ----------------------------------------------------------------------------- // Dec2Bin.java // ----------------------------------------------------------------------------- /* * ============================================== * Copyright (c) 2008 Boston College. All rights reserved. * * This code is the copyright of Boston College and is protected * under copyright laws of the United States. This source code may * not be hosted on any other site without my express, prior, written * permission. * ============================================== */ import java.util.*; /** * ----------------------------------------------------------------------------- * This program demonstrates how to convert a decimal number to * its binary representation. * * @version 1.0 * @author Hao Jiang (hjiang@cs.bc.edu) * @author http://www.cs.bc.edu/~hjiang * ----------------------------------------------------------------------------- */ public class Dec2Bin { /** * Convert a decimal number into its binary * representation. * @param n The input number. */ public static String convert(int n) { int m = n % 2; if (m == n) { String s = new Integer(n).toString(); return s; } return convert(n/2) + m; } /** * Sole entry point to the class and application. * @param args Array of argument. */ public static void main(String[] args) { int n = Integer.parseInt(args[0]); System.Out.print(dec2bin(n)); } This is an example code for computing binary representation doc

13 Program design  There are two main methodologies of constructing software Procedure oriented. Data (object) oriented.  We will cover both of these two schemes in our class.  Object oriented programming is a relative new scheme and gaining more and more acceptance.  We spend quite some time in this class to talk about class, object and how to use them to design computer software.

14 Programming language  We are going to use Java to illustrate programming and solving problems.  Java is a higher level language than C or C++ and therefore easier to program.  Java is designed to be “compiled once and executed anywhere”.  After learning Java, you should be able to learn other programming languages much more quickly..

15 The rough schedule of our class  Our class website is at: www.cs.bc.edu/~hjiang/c101/syllabus.html  Text book: “Introduction to programming in Java” by Robert Sedgewick and Kevin Wayne.  The marking scheme in our class is: Assignment and project 45% Midterm 15% Final Exam 40%

16 Assignment and projects  Programming assignments:  The last assignment is an open project, for which you can do any programming project you are interested in. You will write a proposal. And finally show a demo in class. Projects can be done in groups. A previous programming assignment.

17 About exams  There is one in-class midterm exam and one final exam.  The exams test your understanding of concepts and problem solving skills learned during the class.  The questions for the exam are not too different from the assignments. So, if you come to class and do you assignments, you have all the knowledge necessary for the exams.

18 Other issues  Computer labs.  Programming environment (Command line and IDE).  Office hours.  Teaching assistant.  More questions you have for me?

19 Homework  Find out whether you can access the computer lab (the unix lab). If you cannot, contact me or Phil.  If you would like to install a Java SDK at home, download the newest Java SE (Standard Edition) at http://java.sun.com/javase/downloads/index.jsp download “JDK 6 Update 4”  Next class, we will learn to write the first program in Java.


Download ppt "Computer Science - I Course Introduction Computer Science Department Boston College Hao Jiang."

Similar presentations


Ads by Google