Sunday, April 28, 2019

ITC538 | Final Exam Java| Java

ITC538 | Final Exam Java| Java

 

Rationale

To assess students' understanding of the fundamental concepts of the subject material; their ability to integrate and apply information from various topics; and to apply their understanding and knowledge to simple problems.

Requirements

You are required to sit and pass the final exam in this subject to be eligible for a passing grade. The exam is worth 50% of the marks in this subject and you are required to answer following number of questions:
30 multiple-choice questions worth 45 marks
3 short-answer questions worth 25 marks each
Number of marks:  120 marks
The final exam will cover all the subject's topics.
 
SAMPLE EXAMINATION
INSTRUCTIONS TO CANDIDATES:
  1. Enter your name, student number and signature into the box below.
  2. Attempt ALL questions.
  3. Start a new page for each new question, but NOT for each part of a question.
  4. Read each question carefully to ensure that you have answered everything that is required in the question. Most questions have multiple parts.
  5. There are 120 possible marks for this examination.
  6. This examination is worth 50% of the final assessment for this subject.
INSTRUCTIONS TO INVIGILATORS:
Question paper May not be retained by the candidate
 
PART A – Multiple-choice Questions (Total Marks 45)
In this part there are 30 questions each worth 1.5marks.
Select what you consider to be the correct answer for each question and mark it on the supplied answer sheet using a lead pencil.
Make sure that you put your name and student number on the answer sheet. The question sheet and the answer sheet are to be returned with the rest of the examination paper.
A full sample of multiple choice questions is not available for release. The following questions provide an indication of the style of multiple choice questions.
 

 

 
  1. What of the following is a valid identifier?
radius
  1. 8+9
  2. class
  3. $343
  1. What is output by the following code?
int x = 2, y = 5;
if ((x < 5) && (y != 5))
System.out.println(x/y);
else if ((x > 3) || (y < 10))
System.out.println(x – y);
else
System.out.println(x + y);
  1. 0
  2. 1
  3. 7
  4. -3
  1. Analyse the following code.
boolean even = ((231 % 2) == 0);
if (even == true)
System.out.println("It is even!");
else
System.out.println("It is odd!");
Which of the following is true?
  1. The program has a syntax error
  2. The program displays "It is even!"
  3. The program has a run-time error
  4. The program displays "It is odd!"
  1. What is y after the following switch statement?
int x = 0;
int y = 2;
switch (x + 1) {
case 0: y = 0;
case 1: y = 1;
default: y = -1;
}
  1. 2
  2. 0
  3. 1
  4. -1
  1. What is output by the following code? int x = 1, y = 2;
while (x <= 11) {
y += 2;
x += y
System.out.print(x + " " + y + " ");
}
  1. 5 4 6 11
  2. 5 4 11 6 19 8
  3. 4 5 6 11
  4. 3 4 10 8 19
  1. What is output by the following code?
for (int i=0; i < 5; ++i)
System.out.print(i*2 + ", ");
  1. 0, 1, 2, 3, 4,
  2. 0, 2, 4, 6,
  3. 0, 2, 4, 6, 8,
  4. 2, 4, 6, 8, 10,
  1. What is the effect of the following code?
int balance = 10;
while (balance > =1) {
if (balance < 9) break;
balance = balance – 9;
}
  1. After the code, balance has the value 1
  2. After the code, balance has the value 10
  3. After the code, balance has the value -1
  4. After the code, balance has the value 2
  1. The header of a method is specified as: int func(double x)
Which of the following expressions or statements contains an illegal method call?
  1. return func(2);
  2. func(1+2.2)
  3. func(func(2.5))
  4. out.print(func());
  1. What is the output by the following code?
char ch1 = 'A';
System.out.println(ch1 + " + 4 is " + (ch1 + 4));
  1. A + 4 is E
  2. A + 4 is 69
  3. A + 4 is A4
  4. A + 4 is 654
  1. The variable tax has been declared of type double and has the value 19.257. For the expression (int)(tax*100)/100.0
which of the following is true?
It is illegal
  1. Its value is 19
  2. Its value is 19.25
  3. Its value is 0.0
  1. A programmer has written the following method to swap the values of two arguments passed to it.
static void swap(int x, int y) {
int temp = x;
x = y;
y = temp;
}
Which of the following is true for this method?
  1. It will cause a compilation error
  2. It will compile and execute as intended
  3. It will cause a run-time error
  4. It will cause a logic error
  1. A programmer has written a hypotenuse method, which is used as follows:
int x = 3, y = 6;
double length = hypotenuse(x, y);
The header for the hypotenuse method is:
  1. void hypotenuse(x, y)
  2. double hypotenuse(a, b)
  3. void hypotenuse(int x, int y)
  4. double hypotenuse(int a, int b)
  1. Overloading in Java allows:
    1. methods in a class to have the same name but different parameter lists
    2. variables in different methods to have the same name
  1. methods inherited from a superclass to be modified
  2. a memory location to be used for different variables at different times
  1. The keyword used to make a variable belong to a class, rather than to each instance of a class is:
  1. import
  2. class
  3. static
  4. final
  1. A programmer has written a method named fillIt to initialise the elements of an array of integers.
The programmer uses the method as follows:
int[] numbers = new int[20];
fillIt(numbers);
Which of the following is true?
  1. The array object must be constructed inside the method, not outside it
  2. The elements of an array cannot be initialised using a method
  3. The design is correct
  4. If the array object is constructed outside the method, a reference must be returned
PART B – Short-Answer Questions (Total Marks 75)
In answering the questions in this part, you may assume the existence of any standard data entry classes you typically use, such as Scanner.
Question 1 (25 marks)
(a) (Computing x) Approximate the value of a quantity x using the following series:
x = 1 + 1/2 + 1/3 + 1/4+....+1/n where n is a positive integer. The value of n should be passed to the
method.
Write a java method that calculates and displays the value of x for n (for example n = 1000). [7 marks]
  • (Area of regular polygon) A regular polygon is an n-sided polygon in which all sides are of the same length and all angles have the same degree (i.e., the polygon is both equilateral and equiangular). The formula for computing the area of a regular polygon is
where n is the number of sides and s is the side of the polygon.
Write a Java method that returns the area of a regular polygon using the following header:
public static double area(int n, double side).
(Hints: You may need Math.tan() function and Math.PI for area calculations.)
[9 marks]
(c) (Rectangle class) Design a class to represent a rectangle. The class is specified as follows:
  • Two double data fields named width and height hold the width and height of the rectangle. The default values are 1 for both width and height.
  • A no-arg constructor creates a default rectangle.
  • Getter and setter methods are provided for all data fields.
  • Accessor methods return the area and the perimeter.         [9 marks]

Question 2 (25 marks)

(a) Write the code for an Employee class, which has the following fields:
private String name;
private double salary;
Your class should contain the following:
  • Provide a constructor to set the employee’s name using a passed argument and also to set the salary to $0.
  • Provide a constructor that accepts arguments to set the employee’s name and salary. The salary should be set using the mutator method for salary described below.
  • Provide a mutator (i.e. setter) method for the salary that ensures the salary remains within the inclusive range $0 to $100,000. If an attempt is made to set a salary outside this range the current salary will not be changed.
  • Provide accessor (i.e. getter) methods for the name and for the salary. (15 marks)
(b) Write a program, called TestEmployee.java, to do the following:
  • Create an employee object referenced by emp1, using the name “Fred”.
  • Assign a salary of $45,000 for employee “Fred”.
  • Create an employee object referenced by emp2, using the name “Sue” and assigns her a salary of $55,000, all in the one statement.
  • On a separate line for each employee, display the employee’s name and 40% of the salary, for taxation purposes. (10 marks)
Question 3 (25 marks)
The following incomplete WordList class is intended as a collection class for holding a list of words.
class WordList {
private static final int DEFAULTSIZE = 100;
private int maxWords;
private String[] list;
private int length;
}
Here the constant provides a default value to replace any request for an illegal array size, the array provides a place to store the words, maxWords will record the size of the array, and length will record how many words are currently stored in it.
  • Write a constructer for WordList that accepts a parameter for the size of the array. The constructor will create an array for the words of the requested size, or of the default size if the size requested is not appropriate. It will also record the size of the array and set the current length appropriately. (5 marks)
  • Write a method addWord to add a word to the array. This will accept a String reference and return a Boolean value indicating whether or not the word in the String was able to be added. It should update the state of the collection object as appropriate. Note that a String object is immutable and can be added safely to the collection without needing to be copied. (10 marks)
  • Write a method findWord to find the first occurrence in the collection of a word beginning with a specified prefix. This method will accept a reference to a String object containing the prefix and return a String reference to the word found, or null if there is no matching word. The String class contains a startsWith instance method, which accepts a String argument and returns a boolean indicating whether the instance string starts with the argument string. (10 marks)
Material provided by the University
1 x 12pp Answer Booklet
General Purpose Answer Sheet
Material required by the student
Writing implements
2B Pencil and Eraser
Assessment Information
Learning materials

How to apply for special consideration

Academic regulations provide for special consideration to be given if you suffer misadventure or extenuating circumstances during the session (including the examination period) which prevents you from meeting acceptable standards or deadlines. Find the form on the Student Portal page.

Extensions

In order to ensure that students who hand their assignments in on time are not disadvantaged, and to enable me to comply with the requirement to return assignments to the class within 15 working days, the following rules about extensions will be strictly enforced:
  1. Extensions cannot be granted for online tests, as these have to be done within a specific time frame, after which the answers are released to the class automatically.
  1. Computer problems (such as the speed of your computer and the time it may take you to upload assignments onto TURNITIN) and normal work-related pressures and family commitments do not constitute sufficient reasons for the granting of extensions.
  1. If it becomes obvious that you are not going to be able to submit an assignment on time because of an unavoidable problem, you must submit your request for an extension, prior to the due date, either by writing (email is acceptable) to your lecturer/subject coordinator or via the Request for Special Consideration form.
You are encouraged to make requests via email (especially for urgent requests), since the processing time for applications made through the online form can be a few days. Requests for extensions will not be granted on or after the due date so you must make sure that any extension is requested prior to the day on which the assignment is due.
You are expected to do all you can to meet assignment deadlines. Work and family- related pressures do not normally constitute sufficient reasons for the granting of extensions or incomplete grades.
  1. If you apply for an extension, you may be asked to email your lecturer/subject coodinator on what you have done so far on the assignment.
  1. You must be able to provide documentary evidence (such as a certificate from a doctor or counsellor) justifying the need for an extension as soon as practicable - but please note that if the circumstances giving rise to the request for an extension arise on a day when you cannot get documentary evidence, you must still apply for the extension before the due date and submit the documentary evidence afterwards.
  1. Given the tight deadlines involved in returning assignments to students and putting feedback on Interact, the maximum extension granted generally will be seven (7) days from the due date.
  1. Assignments received more than 10 days after the due date or extension date will not be marked unless the staff member decides otherwise. Items received late will be penalised at 10% of the mark available for the assessment item per day it is late (see below).
  1. Note that for purposes of measuring lateness, the 'day' begins just after 00.00 hrs AEST - so an assignment received after midnight of the due date will be penalised 10% for lateness. This rule will be applied to all students uniformly.

Penalties for Late Submission

The Faculty of Business has determined that the penalty for the late submission of an assessment task (without obtaining the Subject Coordinator's approval for an extension) will be:
10% deduction per day, including weekends, of the maximum marks allocated for the assessment task, i.e. 1 day late 10% deduction, or 2 days late 20% deduction.
An example of the calculation would be:
Maximum marks allocated = 20
Penalty for one day late = 2 marks (so, a score of 18/20 becomes 16/20 and a score of 12/20 becomes 10/20).
If an assignment is due on a Friday but is not submitted until the following Tuesday, then the penalty will be four days (40% deduction or 8 marks in the example above).
Submissions more than 10 days late will be acknowledged as received but will not be marked.
 
Resubmission
Under normal circumstances resubmission of assessment items will not be accepted for any of the assessments required in this subject.
 
Online Submission
Assignments should be submitted through TurnItIn. Please meet with your respective lecturer to enroll in the Turnitin (If you do not receive any email from Turnitin for this subject).
Assessments such as Blogs, Quizzes, Journals and Discussion Forums are required to submit in the Interact2, unless your lecturer advises otherwise.
Please submit the assignments only as word document in Turnitin, unless your lecturer advises otherwise .
Assignment/s must be submitted through Turnitin by midnight (AEST) according to the date mentioned in the subject outline.
Assignments submitted in the RESPECTIVE FINAL FOLDER only will be considered for marking.

Postal Submission

Under normal circumstances postal submissions will not be accepted for any of the assessments required.

Hand Delivered Submission

Under normal circumstances hand delivered submissions will not be accepted for any of the assessments required.
Assignment Return
You should normally expect your marked assignment to be returned to you within 15 working days of the due date. If you submitted your assignment on time but have not returned by the return date, you should make enquiries in the first instance to the subject lecturer. If the subject lecturer is not available then contact your Course Coordinator on Level 4, 30 Church Lane.
Student Feedback and Learning Analytics

Evaluation of Subjects

CSU values constructive feedback and relies on high response rates to Subject Experience Surveys (SES) to enhance teaching. Responses are fed back anonymously to Subject Coordinators and Heads of Schools to form the basis for subject enhancement and recognition of excellence in teaching. Schools report on their evaluation data; highlighting good practice and documenting how problems have been addressed. You can view a summary of survey results via the Student Portal
We strongly encourage you to complete your online Subject Experience Surveys. You will be provided with links to your surveys via email when they open three [3] weeks before the end of session.
 
Changes and actions based on previous student feedback
  1. Update topics to match the refereed exercise number with the current textbook
  1. Reschedule content in such a way that students get enough time to complete their assignments.
  1. Change assignments so that students can understand what exactly is required to complete.
Learning analytics in this subject
Learning Analytics refers to the collection and analysis of student data for the purpose of improving learning and teaching. It enables the University to personalise the support we provide our students. All Learning Analytics activities will take place in accordance with the CSU Learning Analytics Code of Practice. For more information, please visit CSU’s website.
Data about your activity in the Interact2 site and other learning technologies for this subject will be recorded and can be reviewed by teaching staff to inform their communication, support and teaching practices.
Based on past analytics, changes made to the subject included <ABC> and <XYZ>.
 
Services and Support
Your Service Portal tells you how you can seek services and support. These include study, admin, residential, library, careers, financial, and personal support.
 
Develop your study skills
Devlop your study skills with our free study services. We have services online, on campus and near you. These services can help you develop your English language, literacy, and numeracy.
 
Library Services
provides access to the eBooks, journal articles, books, and multimedia resources needed for your studies and assessments. Get the most out of these resources by contacting Library staff either online or in person, or make use of the many Library Resource Guides, videos and online workshops available.
 
CSU Policies and Regulations
This subject outline should be read in conjunction with all academic policies and regulations, e.g. Student Academic Misconduct Policy, Assessment Policy – Coursework Subjects, Assessment Principles Policy, Special Consideration Policy, Academic Progress Policy, Academic Communication with Students Policy, Student Charter, etc.
 
Subject Outline as a Reference Document
This Subject Outline is an accurate and historical record of the curriculum and scope of your subject. CSU's requires that you retain a copy of the Subject Outline for future use such as for accreditation purposes.
 
The Best Assignment help is one of the best website for assignment help. For more details you may contact us at thebestassignmenthelp@gmail.com or call at +447418324884, +918607503827
 
 

No comments:

Post a Comment

MKT703 SAMPLE

                        MARKETING AND STRATEGY Table of contents   Introduction ................................