Вы находитесь на странице: 1из 38

CS-150

Object Oriented Programming


Week 1

Dr. Sajjad Shami


EED SEN
UMT Lahore
1
House Rules
Please place your mobiles on silent
Please arrive in time to be marked present

Please note that Lecturers cannot focus


and concentrate on the topic if there is
noise and disruption during the lecture

Anyone who disrupts the lecture will be marked absent


or asked to leave and will be awarded minus five mark in
the next quiz. INDISCIPLINE OF ANY KIND WILL RECEIVE
A MINUS FIVE MARK PENALTY.

2
2
• 1. Lecture Slides
• 2. Textbook Sections
• 3. Textbook Examples
• 4. End Problems
• 5. Other Sources: Web,
articles etc.
3
3
COURSE OUTLINE

4
 The primary goal of the course is to learn
algorithm design and principles and practice of
problem solving using Java.
 Topics covered in the course include algorithm
design, basic language elements, control
structures, functions, strings, arrays, file i/o,
introduction to classes, composition,
inheritance, polymorphism and other key
concepts.
 Students will gain hands-on experience through
several programming assignments.

5
 Basic programming concepts
 Good mathematical skills

6
 Participants will have a general understanding
of object oriented programming.
 And will be able to write Java programs of
medium complexity.

7
 Recommended Text:
 Bruce Eckel, ‘Thinking in Java’ Latest edition
(4th). Pearson. [Online Free Edition also
available]
 Online Tutorials
 http://docs.oracle.com/javase/tutorial
 http://www.freejavaguide.com/
 http://www.freewarejava.com/tutorials/index
.shtml

8
• It is vitally important that students use their
tutors as support and as a resource,
throughout the course.
• Students are also encouraged to enrich their
knowledge by searching the Web and
making use of any reference library with a
view to doing course assignments
independently.

9
 Candidates missing more than 25% of the
lectures (i.e. 8 lectures) will receive “SA” grade
in the course.
 Please arrive in time

10
 Candidates attempting to gain an unfair
advantage or colluding in anyway whatsoever
are liable to be disqualified.
 Plagiarism is an offence. However it is ok to
cooperate with your colleagues to help them
to resolve problems with things like operating
the computers, development tools and
program syntax errors.
 These are not honour violations and you can
learn a lot from your colleagues in the course.

11
 All media [CDs etc] must be virus free
 Media containing viruses, or media which
cannot be run directly, will result in a FAIL
grade being awarded for this module.

12
 Quizzes and Assignments: 25% marks
 Mid term Exam: 25% marks
 Final Exam: 50% marks
 Total: 100 marks

13
 Please see attached
 Also on Moodle

14
INFORMAL QUIZ

15
Q1. When was the first PC sold?
Q2. What was its name?
Q3. What is the central component of a PC?

Q4. What is the difference between PC


hardware and software?

Q5. What is a PC operating system ?

16
Q6. Who made the first PC operating system?
Q7. What is the difference between memory
and storage?

Q8. What are the two types of memory in a PC?


Q9. Name four common storage devices?

Q10. Name two famous microprocessor chip


manufacturers.

17
Q11. Name four typical computer peripherals.

Q12. The old style monitors are often called


CRT monitors; what does CRT stand for?

Q13. The new style thin-flat monitors are


called LCD monitors; what does LCD stand
for?
Q14. What does USB stand for?

Q15. How many bits are in a byte?

18
Q16. How many Bytes are in a Kbyte?
Q17. How many Bytes are in a Mbyte?
Q18. How many MBytes are in a GByte?

Q19. What is a bit, anyway?

Q20. Name five Windows versions?

19
 Q21. Name any ten high level programming
languages.
 Q22. In a microprocessor CPU, what is held
inside the Instruction Register (IR) and the
Program Counter (PC) ?

 Q23. What is an ‘interrupt’ for a computer


program?
 Q24. What does each core do in a multi-core
processor?

20
 Q25. What does OSI stand for and what is the
OSI Model?
 Q26. What does DNS stand for and what does
this signify?

 Q27. Briefly describe what is a web server?


 Q28. How would you define a ‘web browser’?

 Q29. What are programming languages that


are not object oriented, called?

21
 Q30. List three features of Object Oriented
Programming techniques

 Q31. What is Client-Server computing?


 Q32. What is a ‘compiler’ ?

22
23
Q1. When was the first PC sold?
A1. 1981

Q2. What was its name?


A2. IBM PC

Q3. What is the central component of a PC?


A3. CPU/Processor/Microprocessor

24
Q4. What is the difference between PC hardware and
software?
A4. Broadly, the components that you can touch
physically, are hardware while all
programs/programming (which you cannot touch) that
are run on the PC or that run some devices on the PC are
collectively called software.

Q5. What is a PC operating system ?


A5. It is the software/program that ‘operates’ the PC and
is used for basic housekeeping tasks.

25
Q6. Who made the first PC operating system?
A6. Microsoft Corporation.

Q7. What is the difference between PC memory and


storage?
A7. Generally, the electronic area where programs are
loaded for running, and where computations and
calculations are done for each activity is PC memory
while the much larger electronic area, where user
files/documents/images etc. are stored, is called
storage.

26
Q8. What are the two types of memory in a PC?
A8. Read-Write Memory (RAM) and Read-Only Memory
(ROM).

Q9. Name four common storage devices?


A9. Hard-disk Drive, Floppy-Disk, CD-ROM, DVD, USB-
stick.

Q10. Name two famous microprocessor chip


manufacturers.
A10. Intel and AMD (Advanced Micro Devices).

27
Q11. Name four typical computer peripherals.
A11. Monitor, keyboard, mouse, printer.

Q12. The old style monitors are often called CRT


monitors; what does CRT stand for?
A12. Cathode Ray Tube.

Q13. The new style thin-flat monitors are called LCD


monitors; what does LCD stand for?
A13. Liquid Crystal Display.

28
Q14. What does USB stand for?
A14. Universal Serial Bus.
Q15. How many bits are in a Byte?
A15. Eight.
Q16. How many bytes are in a KByte?
A16. 1024.
Q17. How many Bytes are in an MByte?
A17. 1024x1024 = 1048576
Q18. How many MBytes are in a GByte?
A18. 1024.

29
Q19. What is a bit, anyway?
A19. ‘bit’ originated from ‘binary digit’. It is the
smallest unit of information used in computers,
typically a ‘0’ or a ‘1’.

Q20. Name five Windows versions?


A20. Windows95, Windows98, WindowsME,
Windows2000, WindowsXP.

30
 Q21. Name any ten high level programming languages.
 A21. FORTRAN, LISP, C, Pascal, BASIC/Visual BASIC, Java,
PL/1, Python, C++, C Sharp, COBOL,..

 Q22. In a microprocessor CPU, what is held inside the


Instruction Register (IR) and the Program Counter (PC) ?
 A22. The IR holds the binary code for each instruction as
it is executed. The PC holds the memory address of the
next instruction to be executed.

31
 Q23. What is an ‘interrupt’ for a computer
program?
 A23. An interrupt is the occurrence of a condition _
an event _ that causes a temporary suspension of a
computer program while the condition is serviced by
another program.

32
 Q24. What does OSI stand for and what is the OSI
Model?
 A24. Open Systems Interconnection. The OSI Model is
an abstract description for layered communications
and computer network protocol design.
 Q25. What does each core do in a multi-core
processor?
 A25. Each core executes a separate task in a program
which increases the overall speed of execution if the
program is written to take advantage of the multiple
cores.

33
 Q26. What does DNS stand for and what does this
signify?
 A26. Domain Name System. It is a hierarchical naming
system for computers, services, or any resource
connected to the Internet or a private network. It
associates various information with domain names
assigned to each of the participants.
 Q27. Briefly describe what is a web server?
 A27. A web server is a computer program that delivers
(serves) content, such as web pages, using the
Hypertext Transfer Protocol. The term can also refer to
the computer or virtual machine running the program.
34
 Q28. How would you define a ‘web browser’?
 A28. A web browser is a software application for
retrieving, presenting, and traversing information
resources on the World Wide Web.

 Q29. What are programming languages that are not


object oriented, called?
 A29. P r o c e d u r a l (programming) languages.

35
 Q30. List three features of Object Oriented
Programming techniques
 A30. OO Programming techniques may include
features such as data abstraction, encapsulation,
modularity, polymorphism, and inheritance.
 Q31. What is Client-Server computing?
 A31. Client-server computing or networking is a
distributed application architecture that partitions
tasks or work loads between service providers
(servers) and service requesters, called clients. Often
clients and servers operate over a computer network
on separate hardware.
36
 Q32. What is a ‘compiler’?
 A32. A compiler is a computer program (or set of
programs) that transforms source code written in a
computer language (the source language) into
another computer language (the target language,
often having a binary form known as object code).
The most common reason for wanting to transform
source code is to create an executable program.

37
 32/32 Excellent
 22-31 Very good
 10-21 Need to study more
 Under 10 ?

38

Вам также может понравиться