Java
|
COSC 5302 Computer Science Core Topics |
||
|
|
|
|
|
Student Number |
|
Due date: February 19, 2019 |
|
Name |
|
Due time: Midnight |
|
Surname |
|
|
ASSIGNMENT #1 (Points 100)
Here is the Assignment for this week. Please answer all questions in detailed. Do not write only the results of the questions. Try to show all solutions step by steps. Your answer for the assignments should be written on the same word document (this document) after each questions separately. The assignment should be uploaded into Blackboard. Do not send the Assignments via e-mail to me.
All assignments have a due date. It is important to submit the assignments on time. Late submission will not be graded and you will get zero.
All questions of assignments are selected from the course topics. Therefore, please read the slides what I uploaded for this course carefully. If you do not understand the content please do not hesitate to ask me over discussion board or via e-mail. Good luck!
Note that: Your answers should be placed after each questions separately in this sheet. Please do not forget to write your student number, your Name and Surname on the left top side of this sheet. The points of each questions are equal.
Questions
1) How many does Java have primitive date types? Explain the feature of each data types with their sizes (5 points).
2) What does keywords in java mean? Explain and give some examples of keywords in java (5 points).
3) The variable names in Java should be descriptive. Why? Give an example (5 points).
4) What is the UNICODE character sets and compare it with ASCII code character set? (5 points).
5) What is logical operators? Write their names and give brief explanation about their features (5 points).
6) What do you understand when we discuss about precedence in computing? Write the precedence in Java programming (5 points).
7) What is the difference between the comparison operator = = and the assignment operator =. Explain (5 points).
8) Explain the Continue and break statements (5 points).
9) Why do we use methods in Java? Explain (5 points).
10) Write a methods header and explain each parts (5 points).
Classical Question (50 points)
What is difference between an algorithm and a flow chart? Draw a flowchart for a quadratic equation?
Note that: For solving a quadratic formula we are using the following formulas respectively.
(General formula for a quadratic equation)
1. Step:
2. Find the constants of the given equation.
a = 1, b = 2 and c = -3
3. Calculate the discriminant:
=
4. If d ˃ = 0, we have two real roots which can be calculated with following formulas:
5. If d˂ 0, this equation does not have real roots.
Draw a flow chart.
Write a program in Java to calculate a given quadratic equation using above steps.
COSC 5302
Computer Science Core Topics
Student Number
Due date:
February 19
, 2019
Name
Due time: Midnight
Surname
ASSIGNMENT #1 (Points 100)
Here is the Assignment for this week. Please answer all questions in detailed. Do not write only
the results of the questions. Try to show all solutions step by steps. Your answer for the
assignments should be written on the same word document (this document) after each questions
separately. The assignment should be uploaded into Blackboard. Do not se
nd the Assignments
via e
-
mail to me.
All assignments have a due date. It is important to submit the assignments on time. Late
submission will not be graded and you will get zero.
All questions of assignments are selected from the course topics. Therefor
e, please read the
slides what I uploaded for this course carefully. If you do not understand the content please do
not hesitate to ask me over discussion board or via e
-
mail. Good luck!
Note that: Your answers should be placed after each questions sepa
rately in this sheet.
Please do not forget to w
rite your student number, your N
ame and Surname on the left
top side of this sheet. The point
s of each questions are equal
.
Questions
1) How many does Java have primitive date types? Explain
the feature of
each
data types
with
their
s
izes (5 points)
.
2)
What does keywords in java
mean
? Explain and give so
m
e examples of keywords in
java (
5 points)
.
3)
The variable names i
n Java should be de
scriptive. Why? Give an example (5 points)
.
4) What is
the
UNICO
DE
character sets and c
ompare
it
with ASCII code
character
set?
(5
points).
5)
What is logical operators?
Write their names and give brief e
xplanation about their
features (5 points)
.
6)
What do you understand when we discuss about precedence in computing? Write the
precedence in Java
programming
(5 points)
.
7)
What is the difference between the comparison operator = = and the assignment
operator =
. Explain (5 points)
.
8
) Explain th
e Continue a
nd break statements
(5 points)
.
9
) Why do
we use methods in Java? Explain (5 points)
.
COSC 5302 Computer Science Core Topics
Student Number Due date: February 19, 2019
Name Due time: Midnight
Surname
ASSIGNMENT #1 (Points 100)
Here is the Assignment for this week. Please answer all questions in detailed. Do not write only
the results of the questions. Try to show all solutions step by steps. Your answer for the
assignments should be written on the same word document (this document) after each questions
separately. The assignment should be uploaded into Blackboard. Do not send the Assignments
via e-mail to me.
All assignments have a due date. It is important to submit the assignments on time. Late
submission will not be graded and you will get zero.
All questions of assignments are selected from the course topics. Therefore, please read the
slides what I uploaded for this course carefully. If you do not understand the content please do
not hesitate to ask me over discussion board or via e-mail. Good luck!
Note that: Your answers should be placed after each questions separately in this sheet.
Please do not forget to write your student number, your Name and Surname on the left
top side of this sheet. The points of each questions are equal.
Questions
1) How many does Java have primitive date types? Explain the feature of each data types
with their sizes (5 points).
2) What does keywords in java mean? Explain and give some examples of keywords in
java (5 points).
3) The variable names in Java should be descriptive. Why? Give an example (5 points).
4) What is the UNICODE character sets and compare it with ASCII code character set? (5
points).
5) What is logical operators? Write their names and give brief explanation about their
features (5 points).
6) What do you understand when we discuss about precedence in computing? Write the
precedence in Java programming (5 points).
7) What is the difference between the comparison operator = = and the assignment
operator =. Explain (5 points).
8) Explain the Continue and break statements (5 points).
9) Why do we use methods in Java? Explain (5 points).