College of Computing and InformaticsAssignment 1
Deadline: Tuesday 20/09/2022 @ 23:59
[Total Mark for this Assignment is 8]
Student Details:
Name: Sara Abdullah al hakim
ID:S210029091
CRN: 10930
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
Explain the basic
Write a complete Java program that performs the following tasks:
2 Marks
principles of
programming,
1. Print your full name with double quotes.
concept of
language, and
universal
constructs of
programming
languages.
2. Print your home address in 3 lines but using a single print method. The first
line of output is your home number or building number, the second line of
output is your street, and the third line of output is your district.
3. Print the Boolean value for the mathematical expression 100 < 200.
4. Print your first name in lower case and your last name in upper case using %s
format string in a single line.
Note:
•
The class name of your Java program must be your first name.
•
Your answer should have the code as text as well as the screenshot of the
program output (using your own name and your home address) as a part of
your answer. Otherwise, zero marks will be awarded.
Typical run of the program
Question One
Pg. 02
ANSWER
package javaapplication1;
public class Sara {
public static void main(String[] args) {
System.out.println("\"Sara Abdullh\"");
System.out.println("No.5\nalansary\nSaihat");
System.out.println(100