IT401 Saudi Electronic University Basic Principles of Programming Questions 1- Explain the basic principles of programming, concept of language. Universal constructs of programming languages.
Write a complete Java program to print the following:
Your name
The CRN number for your Class
Note: Include the screenshot of program output as a part of your answer.
2- Demonstrate Integrated Development Environment (IDE) for the editing, building, debugging, and testing of programs.
The following program is written to calculate the addition for two numbers (9,3). Unfortunately, the program has Compile-time and Run-time errors that prevent the program from running and producing the correct result. Using the Table 2.1 below, allocate the error(s) on each program line.
// define new class
public Calculation {
private int result_add
// define add method to add two numbers
intnumber1 = first_number;
double number2 = second_number;
result_add= number1/number2;
}
/ return the value
public int getvalue()
{
return result_add;
}
public static void main(String[] args) {
// define new object with name summation
Calculation summation = Calculation();
summation.add(9,3);
int result= getvalue();
System.println(result);
}
}
}
5.public void add(int first_number,int second_number) {
3- Write a complete Java program to create three types of counters as follows:
The first counter increases its value by one.
The second counter increases its value by two.
The third counter increases its value by three.
Please follow these notes:
Create one class for all counter types. The name of the class is Three_type_counter.
Define a constructor method that initial values for all counters to 7 when the class object created.
Create method for each counter as: count1, count2 and count3. Each method has to increase each counter value by one, two and three respectively.
In the main program:
Create new object with name obj_counter.
Call the three methods for each counter at one time.
Print out the values for all counters.(support your answer by screenshot)
Thank you I am waiting for the answer, please that there is no similarity with any student answered and thank you
You find the file attached to it all the questions College of Computing and Informatics
Assignment #1
Deadline: Day 04/10/2019 @ 23:59
[Total Mark for this Assignment is 5]
Student Details:
Name: ###
ID: ###
CRN: ###
Instructions:
This Assignment must be submitted on Blackboard via the allocated folder.
Email submission will not be accepted.
You are advised to make your work clear and well-presented, marks may be reduced for
poor presentation.
You MUST show all your work.
Late submission will result in ZERO marks being awarded.
The work should be your own, copying from students or other resources will result in
ZERO marks.
Use Times New Roman font for all your answers.
Question One
Pg. 01
Learning
Outcome(s):
Instructors: LO1:
Explain the basic
principles of
programming,
concept of
language.
Universal
constructs of
programming
languages.
Question One
1 Mark
Write a complete Java program to print the following:
1. Your name
2. The CRN number for your Class
Note: Include the screenshot of program output as a part of your answer.
Question Two
Pg. 02
Learning
Outcome(s):
Instructors: LO3:
Demonstrate
Integrated
Development
Environment
(IDE) for the
editing, building,
debugging, and
testing of
programs.
2 Marks
Question Two
The following program is written to calculate the addition for two numbers
(9,3). Unfortunately, the program has Compile-time and Run-time errors that
prevent the program from running and producing the correct result. Using the
Table 2.1 below, allocate the error(s) on each program line.
1. // define new class
2. public Calculation {
3.
4.
5.
6.
7.
8.
private int result_add
// define add method to add two numbers
public void add(int first_number,int second_number) {
int
number1 = first_number;
double number2 = second_number;
result_add= number1/number2;
9. }
10. / return the value
11. public int getvalue()
12. {
13. return result_add;
14. }
15. public static void main(String[] args) {
16. // define new object with name summation
17. Calculation summation = Calculation();
18. summation.add(9,3);
19. int result= getvalue();
20. System.println(result);
21. }
22. }
23. }
Question Two
Pg. 03
Table 2-1
Line Number
Compile-time / Run-time error
1
No error
2
Miss word class
3
4
5
No error
6
No error
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Question Three
Pg. 04
Learning
Outcome(s):
Instructors: LO3:
Demonstrate
Integrated
Development
Environment
(IDE) for the
editing, building,
debugging, and
testing of
programs.
2 Marks
Question Three
Write a complete Java program to create three types of counters as follows:
1. The first counter increases its value by one.
2. The second counter increases its value by two.
3. The third counter increases its value by three.
Please follow these notes:
1. Create one class for all counter types. The name of the class is
Three_type_counter.
2. Define a constructor method that initial values for all counters to 7 when
the class object created.
3. Create method for each counter as: count1, count2 and count3. Each
method has to increase each counter value by one, two and three
respectively.
4. In the main program:
a. Create new object with name obj_counter.
b. Call the three methods for each counter at one time.
c. Print out the values for all counters.(support your answer by
screenshot)
Purchase answer to see full
attachment
Consider the following information, and answer the question below. China and England are international trade…
The CPA is involved in many aspects of accounting and business. Let's discuss some other…
For your initial post, share your earliest memory of a laser. Compare and contrast your…
2. The Ajax Co. just decided to save $1,500 a month for the next five…
How to make an insertion sort to sort an array of c strings using the…
Assume the following Keynesian income-expenditure two-sector model: AD = Cp + Ip Cp = Co…