0% found this document useful (0 votes)
55 views

Object Oriented Programing Assignment One

Uploaded by

gosaye
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
55 views

Object Oriented Programing Assignment One

Uploaded by

gosaye
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

ADDIS ABABA UNIVERSITY (AAU)

ADDIS ABABA INSTITUTE Of TECHNOLOGY (AAIT)


CENTRE OF BIOMEDICAL ENGINEERING (CBME)

Object Oriented Programming Assignment 1

Name ID
Submitted by Gosaye Emshaw UGR/1636/12
Submitted to Mr. Samuel Melke
Submission date 10/8/2021
OBJECT ORIENTED PROGRAMING ASSIGNMENT
Chapter one exercises

1.4 Fill in the blanks in each of the following statements:


a. The logical unit that receives information from outside the computer for use by the
computer is the input unit.
b. The process of instructing the computer to solve a problem is called programming.
c. Assembly language is a type of computer language that uses English like
abbreviations for machine-language instructions.
d. Output unit is a logical unit that sends information which has already been processed
by the computer to various devices so that it may be used outside the computer.
e. Memory unit and secondary storage unit are logical units of the computer that
retain information.
f. Arithmetic logic unit is a logical unit of the computer that performs calculations.
g. Logic unit is a logical unit of the computer that makes logical decisions.
h. High-level languages are most convenient to the programmer for writing programs
quickly and easily.
i. The only language a computer can directly understand is that computer’s machine
language.
j. Central processing unit is a logical unit of the computer that coordinates the
activities of all the other logical units.
1.5 Fill in the blanks in each of the following statements:
a. The java programming language is now used to develop large-scale enterprise
applications, to enhance the functionality of web servers, to provide applications for
consumer devices and for many other purposes.
b. C initially became widely known as the development language of the UNIX operating
system.
c. The transmission control protocol (TCP) ensures that messages, consisting of
sequentially numbered pieces called bytes, were properly routed from sender to receiver,
arrived intact and were assembled in the correct order.
d. The C++ programming language was developed by Bjarne Stroustrup in the early 1980s
at Bell Laboratories.
1.6 Fill in the blanks in each of the following statements:
a. Java programs normally go through five phases—edit, compile, load, verify and
execute.
b. An integrated environment development (IDE) provides many tools that support
the software development process, such as editors for writing and editing programs,
debuggers for locating logic errors in programs, and many other features.
c. The command java invokes the java virtual machine (JVM) , which executes Java
programs.
d. A virtual machine (VM) is a software application that simulates a computer, but
hides the underlying operating system and hardware from the programs that interact
with it.
e. The JVM’s class loader takes the .class files containing the program’s bytecodes and
transfers them to primary memory.
f. The bytecode verifier examines bytecodes to ensure that they’re valid
1.7 Explain the two compilation phases of Java programs.
 Phase one: Source Code is translated into bytecodes
 Phase Two: During execution the bytecodes are translated into machine language for the
actual computer on which the program executes.
1.8 One of the world’s most common objects is a wrist watch. Discuss how each of the following
terms and concepts applies to the notion of a watch: object, attributes, behaviors, class,
inheritance (consider, for example, an alarm clock), modeling, messages, encapsulation,
interface and information hiding.
 Object: - the entire watch which consists the band, the face e. t. c
 Attributes: -time, color, band, style e. t. c
 Behaviors: -include setting the time and getting the time
A watch can be considered a specific type of clock (as can an alarm clock). With that in mind,
it is possible that a class called Clock could exist from which other classes such as watch and
alarm clock could inherit the basic features in the clock. The watch is an abstraction of the
mechanics needed to keep track of the time. The user of the watch does not need to know the
mechanics of the watch in order to use it; the user only needs to know that the watch keeps
the proper time. In this sense, the mechanics of the watch are encapsulated (hidden) inside
the watch. The interface to the watch (its face and controls for setting the time) allows the
user to set and get the time. The user is not allowed to directly touch the internal mechanics
of the watch. All interaction with the internal mechanics is controlled by the interface to the
watch. The data members stored in the watch are hidden inside the watch and the member
functions (looking at the face to get the time and setting the time) provide the interface to
the data.

You might also like