Select Page

IT 401 Saudi Electronic University Business Computer Languages Questions

Question Description

Business Computer Languages

IT401

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 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.

Name:###

CRN:###

ID:###

1.5 Marks

Learning Outcome(s):

LO1: Explain the basic principles of programming, concept of language. Universal constructs of programming languages.

Question One

Write a complete Java program that prints out the following information:

1.Your Name and Email

2.Your favorite hobby and food.

Note:

  • Your program output should look as shown below.
  • Include the screenshot of the program output as a part of your answer. Otherwise, you will be marked zero for this question.

Answer:

1 Marks

Learning Outcome(s):

LO1: Explain the basic principles of programming, concept of language. Universal constructs of programming languages.

Question Two

Identify which of the following name is a valid identifier name. If the name is not valid, explain the reason(s).

Note:

Some of the answers are given to you as an example.

Answer:

Name

Valid / Invalid

Reasons(s)

name

Valid

My id

Invalid

Have a space

1num

why?

st1_name$

class

1 Marks

Learning Outcome(s):

LO3: Demonstrate Integrated Development Environment (IDE) for the editing, building, debugging, and testing of programs.

LO4: Develop a program based on specification using programming language elements including syntax, data types, conditional statement, control structures, procedures and arrays.

Question Three

The following program supposes to calculate the area of a rectangle and square. Then, produce the following output.

Area of Rectangle:
50

Unfortunately, the program has compile-time and run-time errors that prevent the program from running and producing the correct result. Using table 3.1 below, allocate the error(s) on each program line.

1 public class RectangleArea {
2 Public static void main() {
3 int width == 10;
4 int height = 5;
5 int recArea = width + height;
6 System.Out.print(Area of Rectangle:);
7 System.out.println(“recArea”)
8
9

Note:

Some of the answers are given to you as an example.

Table 3.1: compile-time / run-time error

Line No

compile-time / run-time error

1

No error

2

Error.

  • Public should be public
  • Missing main methods parameters String args[]

3

4

5

6

7

8

9

1.5 Marks

Learning Outcome(s):

LO3: Demonstrate Integrated Development Environment (IDE) for the editing, building, debugging, and testing of programs.

LO4: Develop a program based on specification using programming language elements including syntax, data types, conditional statement, control structures, procedures and arrays.

Question Four

Consider the following java class:

class Student {
private intstudent_Number;
private String student_Name;
public Student(int stNo,String name) {
student_Number=stNo;
student_Name=name;
}
public String getName() {
return student_Name;
}
public int getNumber() {
return student_Number;
}
public void setName(String st_name) {
student_Name = st_name;
}
}

Write a Tester class named StudentTester which contains the following instruction:

  • Use the contractor to create a student object where student_Number =12567, student_Name = “Ali”.
  • Use the setName method to change the name of the student to “Ahmad”
  • Print the student details(i.e., student’s name and student’s number).

Note:

Include the screenshot of the program output as a part of your answer. Otherwise, you will be marked zero for this question.

Answer:

"Place your order now for a similar assignment and have exceptional work written by our team of experts, guaranteeing you "A" results."

Order Solution Now