Words of Wisdom:

"It's easy for an angel to become a devil, but impossible for a devil to become an angel." - Junerock

Sd2720 Module 3 Working with Methods

  • Date Submitted: 07/03/2016 07:00 AM
  • Flesch-Kincaid Score: 56.2 
  • Words: 384
  • Essay Grade: no grades
  • Report this Essay
SD2720 Module 3 Working with Methods


Click Link Below To Buy:

http://hwcampus.com/shop/sd2720-module-3-working-with-methods/

SD2720 Module 3 Working with Methods and Encapsulation Lab 3.1 Creating a Method

In this lab, you will complete two tasks related to Java methods. The tasks performed in this lab will help you use method overloading and understand ambiguous overloading.
Task 1
Write a program for swapping two numbers. In the program:
• Create a method by passing primitive values as parameters for checking the result.
• Create another method by passing object references as parameters for checking the result.
• Identify the difference between two outputs.

Task 2
Write a Java program that accepts 10 numbers from the user and finds the greatest and smallest numbers among them. Create two methods, findGreatest() and findSmallest(), to find the greatest and smallest numbers, respectively.

Task 3
Write a Java program that implements the following methods:
• getNumbers()to accept two numbers from the user.
• calculateHCD()to calculate the highest common divisor (HCD) of the two numbers. Please note that it should be a recursive function.
• calculateLCM()to calculate the least common multiple (LCM) of the two numbers.

Display()to display HCD and LCM.

Submission Requirements:
Compress your Java project folder and responses in a Microsoft Word document into one zipped folder and submit it to the instructor.
Evaluation Criteria:
Your submission will be evaluated against the following criteria using the lab rubric:
Task 1
• Did you create a method by passing primitive values as parameters?
• Did you create a method by passing object reference values as parameters?
• Did you identify the difference between two outputs?
• Is the code readable and documented?

Task 2
• Did you write a Java program that accepts 10 numbers?
• Did you use the findGreatest() and findSmallest() methods to find the...

Comments

Express your owns thoughts and ideas on this essay by writing a grade and/or critique.

  1. No comments