IT 232 SEU Write a Program Questions

College of Computing and InformaticsAssignment #1
Deadline: Day 01/10/2023 @ 23:59
[Total Mark for this Assignment is 8]
Student Details:
Name: ###
ID: ###
CRN: ###
Instructions:
• You must submit two separate copies (one Word file and one PDF file) using the Assignment Template on
Blackboard via the allocated folder. These files must not be in compressed format.
• It is your responsibility to check and make sure that you have uploaded both the correct files.
• Zero mark will be given if you try to bypass the SafeAssign (e.g. misspell words, remove spaces between
words, hide characters, use different character sets, convert text into image or languages other than English
or any kind of manipulation).
• Email submission will not be accepted.
• You are advised to make your work clear and well-presented. This includes filling your information on the cover
page.
• You must use this template, failing which will result in zero mark.
• You MUST show all your work, and text must not be converted into an image, unless specified otherwise by
the question.
• Late submission will result in ZERO mark.
• The work should be your own, copying from students or other resources will result in ZERO mark.
• Use Times New Roman font for all your answers.
Question One
Pg. 01
Learning
Outcome(s):
Question One
Recognize the
Explain the origin and the use of .class file in Java Programming.
2 Marks
concept of objectoriented
programming and
creating classes
1
Question Two
Pg. 02
Learning
Outcome(s):
Explain the basic
principles of
programming,
concept of
language, and
universal
constructs of
programming
Question Two
3 Marks
Write a program that takes the birth year from the user and prints her/his age.
Here are sample runs of the program:
Sample 1:
Enter your birth year: 1981
Your Age is: 42 years
Sample 2:
Enter your birth year: 2000
Your Age is: 23 years
languages
2
Question Three
Pg. 03
Learning
Outcome(s):
Develop a
Question Three
3 Marks
What is the output of each of the following? (Note: if there is an error, you must
specify the type of the error: syntax error or runtime error or logic error)
program based on
specification
using
programming
a)
(0.5 marks)
double a = 5;
double b = 2;
language
elements
including syntax,
System.out.println(a+b);
data types,
conditional
b)
statement, control
String a = “5”;
String b = “2”;
structures,
procedures,
System.out.println(a+b);
arrays, objects
and classes.
(0.5 marks)
c)
(0.5 marks)
int a = “5”;
int b = “2”;
System.out.println(a+b);
d)
(0.5 marks)
int a = 5;
int b = 0;
System.out.println(a/b);
3
Question Three
Pg. 04
e)
(0.5 marks)
int a = 5;
int b = 2;
System.out.println(a%b);
f)
(0.5 marks)
int a = 5;
int b = a++;
b +=5;
System.out.println(b++);
4

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper

Order a unique copy of this paper

600 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
$26
Top Academic Writers Ready to Help
with Your Research Proposal

Order your essay today and save 25% with the discount code GREEN