Introduction to Computers and Programming Using Java Fall


























- Slides: 26

Introduction to Computers and Programming Using Java -- Fall, 2007 Professor Deena Engel V 22. 0002: Section 1 Class Hours: TR 9: 30 -10: 45, Room 109 CIWW Email: deena@cs. nyu. edu Office hours: Mondays 12: 30 - 2: 00; Tuesdays 11: 00 12: 30; Room 526, WWH Introduction to Computers and Programming - Class 1

Course Objectives n Upon completing the course, you will understand q Java programming n n n Primitive data types Java control flow structure Methods Arrays Java Applets 2

Course Objectives, cont. n You will be able to q q q Write, compile and run JAVA programs. Create and use methods Develop Java applets Write interesting projects Establish a firm foundation on Java concepts 3

Course Text Book n n Introduction to JAVA Programming, Sixth Edition, by Liang, Prentice Hall Available at the NYU Bookstore Lectures in Power. Point format and programs which we write in class will be posted to the class website. Please keep up with the reading! Introduction to Computers and Programming - Class 1 4

Book Chapters to be covered in this class: n Chapter 1 Introduction to Java n Chapter 2 Primitive Data Types and Operations n Chapter 3 Selection Statements n Chapter 4 Loops n Chapter 5 Methods n Chapter 6: Arrays 5

Course Prerequisites n Prerequisites: q n Who should be taking this course: q q q n students who want to switch to a computer science major students who want to take a computer science minor or a computer applications minor (http: //cs. nyu. edu/web/Academic/Undergrad/minors. html) students who are interested in programming Who should NOT be taking this course q q n No prior programming experience required (Really!!) Students trying to get out of taking a math requirement. This class may be more difficult than the math you are trying to avoid. You must get a C or better in this class to take further computer science classes as a major. Introduction to Computers and Programming - Class 1 6

Administrative Matters Introduction to Computers and Programming - Class 1 7

Course Web Site n The course web site is available at: http: //www. cs. nyu. edu/courses/fall 07/V 22. 0002002/index. html n The website contains the following information: q q q q Administrative information Course Syllabus Homework assignments Class notes Class programs Sample exams Compiler instructions Introduction to Computers and Programming - Class 1 8

Additional information on “Black. Board” There will be several items posted on the ITS “Blackboard” program: n The class emailing list will be run from the Blackboard site n Assignment grades will be posted to the class Blackboard site to protect confidentiality All other information about this course will be on the Computer Science Department home page for this course at http: //www. cs. nyu. edu/courses/fall 07/V 22. 0002002/index. html. Introduction to Computers and Programming - Class 1 n 9

Software n n For the course, we will be using JCreator or Net. Beans & SUN JDK software to create, edit, compile and run our JAVA programs These programs are free and you can download and use them for your home computer. q To download software for home use, follow information posted on the course website n n In order to use Jcreator in Windows, you need to download both JDK (Java Development Kit) and the JCreator IDE (Integrated Development Environment). Instructions are posted for Net. Beans as well which runs on both PC and Mac All of these programs are free. If you do not have your own computer, the computer labs on campus have all of the software that you will need. Introduction to Computers and Programming - Class 1 10

Grading n Your grade will be determined as follows: q q q Two Midterm exams (40%) Homeworks (20%) Final Exam (40%) Introduction to Computers and Programming - Class 1 11

Homework • Ten points will be deducted for each class day late with a possible maximum of 30 points being deducted. • Homeworks will not be accepted after the third class following its due date without special permission. • For each assignment that you do not hand in within the time limit, your final grade will be lowered by one letter grade ( i. e. , if you are averaging a B+, but you have missed 2 home works, your final grade will be B-). • Submit the program via email to the grader (more on this later) • Be sure to save copies of your programs to removable media or your NYU “home” account; computer crashes or lost programs are not valid excuses for not handing in an assignment! Introduction to Computers and Programming - Class 1 12

A Word About Cheating n For the purposes of this class, cheating is defined as: q q n Copying all or part of another student's homework, project or exam. Allowing another student to copy all or part of your homework, project, or exam. Discussing homework concepts is fine, but you must submit your own work Unless … If you work with a partner, you must both tell me and the grader when the homework is submitted that you worked together and also write that into the comments in both texts of the program comments. If you are caught cheating, you will receive an immediate FAILURE for the course. Introduction to Computers and Programming - Class 1 13

Student Civility n In an effort to make this class enjoyable for everybody… q q Please be on time to class! Please do not talk to your friends and neighbors in class! n n q It disturbs everyone, and makes it hard to concentrate. If you have a question, just ask me! Please turn your pagers and cell-phones off! Introduction to Computers and Programming - Class 1 14

Getting Help: very important!! Whenever you have a question about the course material …please feel free to drop by during my office hours or write me an email message or call me on the phone. If at any time you feel that you are falling behind or are overwhelmed by the material, please let me know and I will be Helptoishelp always verynhappy you! available! n Option 1: Come to my Office Hours q q q n n n Mondays 12: 30 - 2: 00 and Tuesdays 11: 00 - 12: 30 Location: Room 526 Warren Weaver Hall If you cannot make my office hours, I will be happy to make an appointment with you at another time. Option 2: Write to me at deena@cs. nyu. edu Option 3: Call me at 212 -998 -3131 Option 4: We will have tutors available in the lab and available by email to help you with your work Introduction to Computers and Programming - Class 1 15

Basic Computing information and history 16

What is a Computer? n Computer q q n Hardware q q n Device capable of performing computations and making logical decisions Computers process data under the control of sets of instructions called computer programs Various devices comprising a computer Keyboard, screen, mouse, disks, memory, CD-ROM, and processing units Software q Programs that run on a computer Introduction to Computers and Programming - Class 1 17

Hardware Trends n Every year or two the following approximately double: q q Amount of memory in which to execute programs Amount of secondary storage (such as disk storage) n q Used to hold programs and data over the longer term Processor speeds n The speeds at which computers execute their programs Introduction to Computers and Programming - Class 1 18

Computer Organization n Six logical units in every computer: q Input unit n q Output unit n q Performs arithmetic calculations and logic decisions Central processing unit (CPU) n q Rapid access, low capacity, stores input information Arithmetic and logic unit (ALU) n q Outputs information (to screen, to printer, to control other devices) Memory unit n q Obtains information from input devices (keyboard, mouse) Supervises and coordinates the other sections of the computer Secondary storage unit n n Cheap, long-term, high-capacity storage Stores inactive programs Introduction to Computers and Programming - Class 1 19

Evolution of Operating Systems n Single_user Batch processing q n Do only one job or task at a time Early Operating systems q q Manage transitions between jobs (minimizing transition time between jobs) Increased throughput n n Multiprogramming q n Amount of work computers process Computer resources are shared by many jobs or tasks (users still waited a long time for their output) Timesharing (access computers via terminals) q Computer runs a small portion of one user’s job then moves on to service the next user Introduction to Computers and Programming - Class 1 20

Personal Computers n Personal computers q q q n Distributed computing q n Economical enough for individual Popularized by Steve Jobs and Steve Wozniak with the introduction of the Apple in 1977. In 1981 IBM introduced the IBM personal computer using “off the shelf” components. Computing distributed over networks Client/server computing q Sharing of information across computer networks between file servers and clients (personal computers) Introduction to Computers and Programming - Class 1 21

Programming languages Three types of programming languages q Machine languages n n Strings of numbers giving machine specific instructions Example: +1300042774 +1400593419 +1200274027 q Assembly languages n English-like abbreviations representing elementary computer operations (translated via assemblers) q q Example: LOAD BASEPAY ADD OVERPAY STORE GROSSPAY High-level languages n n n Codes similar to everyday English Use mathematical notations (translated via compilers) Example: gross. Pay = base. Pay + over. Time. Pay Introduction to Computers and Programming - Class 1 22

Other High-level Languages n high-level languages q FORTRAN n q COBOL n q Used to manipulate large amounts of data Pascal n q Used for scientific and engineering applications Intended for academic use Ada n Used in Defense Department Applications Introduction to Computers and Programming - Class 1 23

Structured Programming n Structured programming q q n Disciplined approach to writing programs Clear, easy to test and debug and easy to modify Structured programming is hard and takes time to master Introduction to Computers and Programming - Class 1 24

The Key Software Trend: Object Technology n Objects q q Reusable software components that model items in the real world Meaningful software units n n q Date objects, time objects, paycheck objects, invoice objects, audio objects, video objects, file objects, record objects, etc. Any noun can be represented as an object More understandable, better organized, and easier to maintain than procedural programming Introduction to Computers and Programming - Class 1 25

Good luck! I look forward to working with you!! Please speak to me if you have questions or comments Deena Engel (mail to: deena@cs. nyu. edu or call at 212 -998 -3131) Introduction to Computers and Programming - Class 1 26