Question Details

(solution) Assignment 4 Due date: Saturday - December 12th, 2015 at 11:59


I need your help regarding attached questions


I need the solution's with explanation please.


Assignment 4

 

Due date: Saturday - December 12th, 2015 at 11:59 PM.

 

Q1:

 

Q1 [5 Points]

 

Scenario:

 

Write a Java program that fills an array of size 50 with random numbers between 0 and 100.

 

Then, find the minimum number in the array and its index. Q2:

 

Q2 [5 Points]

 

Scenario:

 

Write a program that takes input of names from user. Print total names number and all names.

 

NOTE: Solve this problem using ArrayList and Enhanced For Loop.

 

Typical run of the program:

 

Enter a name: (Q to exit)

 

Ali

 

Enter a name: (Q to exit)

 

Sarah

 

Enter a name: (Q to exit)

 

David

 

Enter a name: (Q to exit)

 

Ahmad

 

Enter a name: (Q to exit)

 

Jhon

 

Enter a name: (Q to exit)

 

q

 

You entered 5 names which are:

 

Ali | Sarah | David | Ahmad | Jhon Q4: [5 Points]

 

Q3

 

What is call by value? Explain it with an example of swapping between two numbers. Q5: [5 Points]

 

Q4

 

Scenario:

 

Design a class to represent Employees in a small company according to the following

 

requirements:

 

1- An employee has three attributes: name , salary and jobTitle

 

2- Add one constructor without parameters. In initialization of objects, Name is set to the

 

value ?NEW? and salary value is unspecified but it has to be an arbitrary number

 

between 100 and 20000.

 

3- Add the following methods to the class: getSalary- Returns employee?s salary.

 

getName- Returns employee?s name.

 

getJobTitle- Returns employee?s job title.

 

setName- Sets the employee?s name to a given value. Precondition: the number of

 

characters in the given name is not less than 3 characters.

 

setSalary - Sets the employee?s salary to a given value. Precondition: the given salary

 

value should be greater than 100. 4- All employees in this company have the same permanent job title: ?Accountant? and it

 

can?t be changed.

 


Solution details:

Pay using PayPal (No PayPal account Required) or your credit card . All your purchases are securely protected by .
SiteLock

About this Question

STATUS

Answered

QUALITY

Approved

DATE ANSWERED

Sep 13, 2020

EXPERT

Tutor

ANSWER RATING

GET INSTANT HELP/h4>

We have top-notch tutors who can do your essay/homework for you at a reasonable cost and then you can simply use that essay as a template to build your own arguments.

You can also use these solutions:

  • As a reference for in-depth understanding of the subject.
  • As a source of ideas / reasoning for your own research (if properly referenced)
  • For editing and paraphrasing (check your institution's definition of plagiarism and recommended paraphrase).
This we believe is a better way of understanding a problem and makes use of the efficiency of time of the student.

NEW ASSIGNMENT HELP?

Order New Solution. Quick Turnaround

Click on the button below in order to Order for a New, Original and High-Quality Essay Solutions. New orders are original solutions and precise to your writing instruction requirements. Place a New Order using the button below.

WE GUARANTEE, THAT YOUR PAPER WILL BE WRITTEN FROM SCRATCH AND WITHIN A DEADLINE.

Order Now