Description

Description

Hello, I hope you pay attention. I want correct and perfect work. I want all the questions to be solved correctly and completely without plagiarism. I emphasize this important point. Any percentage of plagiarism will lead to the cancellation of the work. I want a correct solution with references and maintaining the file format without any errors. If you are sure of yourself and that you will do the work correctly, accept the work and make sure of it and your capabilities.

the name is: alaa aljazaeri

id:s230064761

College of Computing and Informatics

Assignment 2
Deadline: Day 24/11/2024 @ 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):
Develop a
program based on
specification
using
programming
language
elements
including syntax,
data types,
conditional
statement, control
structures,
procedures,
arrays, objects
and classes.

Question One

3 Marks

1. Create a class named Person:
o Add the following instance variables:
▪ id (int): Stores a unique identifier for the person.
▪ name (String): Stores the name of the person.
▪ age (int): Stores the age of the person.
2. Implement the following methods in the Person class:
o setId(int id): Assigns a value to the id variable.
o setName(String name): Assigns a value to the name variable.
o setAge(int age): Assigns a value to the age variable.
o getId(): Returns the value of id.
o getName(): Returns the value of name.
o getAge(): Returns the value of age.
3. Write a test program to demonstrate the Person class:
o Create an instance of the Person class.
o Use the setId, setName, and setAge methods to assign values to the
instance.
o Use the getId, getName, and getAge methods to retrieve and print these
values.
4. Output Example:
Your program should produce output similar to the following: (use your real
information for the name and ID)

.

5. Screenshots Required:
o Include a screenshot of your code.
o Include a screenshot of the program output after running the test
program.

Question Two

Pg. 02
Learning
Outcome(s):
Develop a
program based on
specification
using
programming

Question Two
Write a Java program to find the largest element in an array.
1. Program Requirements:
o Prompt the user to input the size of the array.
o Allow the user to input the elements of the array.
o Find and display the largest element in the array.
2. Example Output:
Below is an example of how the program should run:

language
elements
including syntax,
data types,
conditional
statement, control
structures,
procedures,
arrays, objects
and classes.

3. Screenshots Required:
o Include a screenshot of your Java code.
o Include a screenshot of the execution output showing the
program in action.
o Use deferent numbers when running your program

3 Marks

Question Three

Pg. 03
Learning
Outcome(s):

Question Three

2 Marks

Consider the foillowing code:
Develop a
program based on
specification
using
programming
language
elements
including syntax,
data types,
conditional
statement, control
structures,
procedures,
arrays, objects
and classes.

public class OverloadExample {
public int multiply(int a, int b) {
return a * b;
}
public double multiply(double a, double b) {
return a * b;
}
public static void main(String[] args) {
OverloadExample example = new
OverloadExample();
System.out.println(example.multiply(2, 3));
System.out.println(example.multiply(2.5,
3.5));
}
}
1. What happens if you try to call example.multiply(2, 3.5)?
2. Explain which method would be called and why.
3. What will be the output of the following line?

Question Three

Pg. 04
System.out.println(example.multiply(2, 3));
4. Explain why this output is produced.

Purchase answer to see full
attachment

Share This Post

Email
WhatsApp
Facebook
Twitter
LinkedIn
Pinterest
Reddit

Order a Similar Paper and get 15% Discount on your First Order

Related Questions

Description

Description Research Structure: 1. Introduction – Background of the mining industry in general and in KSA. – Importance of digitization and automation. – Objectives of my study. 2. Theoretical Framework – Concepts and theories related to digitization, automation, and the future of work. 3. Literature Review – Summary of existing

Description

Description See College of Health Sciences Department of Health Informatics ASSIGNMENT COVER SHEET Course name: Public health outbreak and disaster management Course number: PHC 372 Assignment title The Role of Technology in Public Health Disaster Management “Natural disasters have always been a significant threat to human lives and infrastructure, causing

Description

Description See College of Health Sciences Department of Public Health ASSIGNMENT COVER SHEET Course name Maternal and Child Health Course number PHC 373 CRN – Branch name XXXXX Assignment title or task: ( write and questions) Discuss the methods, advantages, and criticisms of evidence-based practice in maternal and child health

Description

Description See College of Health Sciences Department of Public Health ASSIGNMENT COVER SHEET Course name Maternal and Child Health Course number PHC 373 CRN – Branch name XXXXX Assignment title or task: ( write and questions) Discuss the methods, advantages, and criticisms of evidence-based practice in maternal and child health

Description

Description see College of Health Sciences Department of Public Health ASSIGNMENT COVER SHEET Course name Maternal and Child Health Course number PHC 373 CRN – Branch name XXXXX Assignment title or task: ( write and questions) Discuss the methods, advantages, and criticisms of evidence-based practice in maternal and child health

Description

Description RISK MANAGEMENT IN MULTI-SECTOR PARTNERSHIPS IN SAUDI ARABIA: A GOVERNANCE PERSPECTIVE Thesis Submitted in Partial Fulfillment of the Requirements for the Award of the Degree of MASTER OF BUSINESS ADMINISTRATION BY DINA MANSOUR ALSHEHRI Under Supervision Dr. Asra Inkesar COLLEGE OF ADMINISTRATIVE AND FINANCIAL SCIENCES SAUDI ELECTRONIC UNIVERSITY 2024-2025

Description

Description Comparison In terms of only 1/ The educational objective 2/ The teaching style 3/ The methodology and tools used no Plagiarism 5-6 pages no Plagiarism No AI INTERNATIONAL JOURNAL OF SPECIAL EDUCATION Vol.33, No.2, 2018 Twice-Exceptionality in the Kingdom of Saudi Arabia: Policy Recommendations for Advances in Special Education

Description

Description Hello, you can continue the research while I get the remaining of data from survey so we can get use of time.

Description

Description I do it but I am not sure. Please make short answer The Impact of Remote Work on Employee Productivity: A Study on Government Sector Employees in Saudi Arabia in the Post-Pandemic Era Thesis Submitted in Partial Fulfillment of the Requirements for the Award of the Degree of MASTER

Description

Description please kindly no AI or Chat gbt. Write about 200-250 for each subject. I have 4 subjects which are: 1- Write a descriptive essay about the best holiday you greatly enjoyed in the past. 2- In your opinion what is the most important element of happiness ? 3- In

Description

Description see College of Health Sciences Department of Public Health ASSIGNMENT COVER SHEET Course name: Advanced Epidemiology Course number: PHC 332 CRN: XXXX Assignment title or task: (You can write a question) Using Causal Criteria show that smoking causes lung cancer. Student Name: XXX Student ID: XXX Submission Date: XXX

Description

Description ‫المملكة العربية السعودية‬ ‫وزارة التعليم‬ ‫الجامعة السعودية اإللكترونية‬ Kingdom of Saudi Arabia Ministry of Education Saudi Electronic University College of Administrative and Financial Sciences Assignment 1 Business Ethics and Organization Social Responsibility (MGT 422) Due Date: 01/03//2025 @ 23:59 Course Name: Business Ethics and Organization Social Responsibility Course Code:

Description

Description ‫المملكة العربية السعودية‬ ‫وزارة التعليم‬ ‫الجامعة السعودية اإللكترونية‬ Kingdom of Saudi Arabia Ministry of Education Saudi Electronic University College of Administrative and Financial Sciences Assignment 2 Business Ethics and Organization Social Responsibility (MGT 422) Due Date: 22/03//2025 @ 23:59 Course Name: Business Ethics and Organization Social Responsibility Course Code:

Description

Description ‫المملكة العربية السعودية‬ ‫وزارة التعليم‬ ‫الجامعة السعودية اإللكترونية‬ Kingdom of Saudi Arabia Ministry of Education Saudi Electronic University College of Administrative and Financial Sciences Assignment 3 Business Ethics and Organization Social Responsibility (MGT 422) Due Date: 26/04/2025 @ 23:59 Course Name: Business Ethics and Organization Social Responsibility Course Code:

Description

Description Revise the word file according to the instructor’s comments, and after making the necessary changes, organize it based on the requirements outlined in the attached PDF. 1 Digital Currencies Student’s Name University Course Title Professor’s Name Date 2 Digital Currencies 1. Research Approach The research design of this study

Description

Description The Impact of AI-Driven Workflow Optimization on Employee Satisfaction in Radiology: The Mediating Role of Job Stress Reduction Thesis Submitted in Partial Fulfillment of the Requirements for the Award of the Degree of MASTER OF BUSINESS ADMINISTRATION BY Liyan Abdumohsen Almayouf Under Supervision Dr .Asra inkesar COLLEGE OF ADMINISTRATIVE

Description

Description the document with the required information on PRISMA and JBI. Both should come in the results section. In Methodology, you should mention them, but give the table/figure in the results section. Also, the total number of references is still less. You can try to cite more relevant articles in

Description

Description SEE College of Health Sciences Department of Public Health ASSIGNMENT COVER SHEET Course name: Applied Biostatistics Course number: PHC321 CRN: 22884 Paper Assignment-1 Answer the following questions in a Word document using the provided datasheet (you may use SPSS or MS Excel for your analysis). The datasheet contains national