Discuss the relationship between the terms and how to determine if a control structure functions properly.

Topic: week 4

Style APA
Number of words 430
Number of sources 0
Spacing Double
PowerPoint slides 0

Module 4: Built-in and User-defined Methods

Learn about Selection Control Structures in the Java Tutorial. Read the Oracle article Control Structures and create a study guide outlining the most important topics and keywords.
a) Write Boolean conditions: Boolean expressions and relational operators
b) Write Combined Boolean conditions: Boolean condition and logical operators
c) Implement a one-way if-statements
d) Implement a two-ways if-else statement
e) Implement a switch statement

Learn about Loop control structure by reading: Loops in Java

Take notes on the following parts of a loop:

a) Implement a while loop
b) Implement a for loop
c) Implement loops using break and continue

Learn about Method constructor and type

Finding Constructors
Understanding constructors
a) Explore the main() method
b) Understand the method header or signature
c) Utilize built-in methods to understand parameters and arguments
d) Define a method with formal parameters
e) Invoke a method with actual parameters
f) Define a method without a return value
g) Pass by value and pass by reference
h) Define the scope of the variable

Compose a half to a page paper outlining control structures. Discuss the key terms mentioned in the previous step’s resources including selection, loops, and built-in methods. Discuss the relationship between the terms and how to determine if a control structure functions properly. Cite at least two sources from the library database in your APA-style submission.

PT2

1) Work in groups to brainstorm about a simple Java program that uses a selection control structure to test whether the value of the side of the square entered by the user is greater than zero, and then calculates the area of the square and produce the results only if the entered value is greater than zero.

2) Work individually to create the program discussed in (1), compile, and run the program using NetBeans. Students then work together to resolve errors (if any).

3) Work in groups to brainstorm about a simple Java program that calculates the area of three different squares three times by allowing the user to enter a different value for the side of the square each time.

4) Work individually to create the program discussed in (1), compile, and run the program using NetBeans. Students then work together to resolve errors (if any).

5) Students brainstorm in groups to create two methods; one calculates the sum of two integers and returns the value and the second calculates the square root of the sum and produces the results. The students then work individually or in groups to create, compile and run a program that utilizes both methods

Assessment:

Students work in groups to create a program that uses three methods; the first method allows the user to re-enter the radius of a circle as long as the value entered is less than 1. The second method calculates the area of a circle for the entered radius. The third method outputs the result based on the following criteria: if the area of the circle is greater than 10, the program output a message to indicate that the calculated area is small. Otherwise, an Output message will indicate that the area is big.

 

Image preview for “discuss the relationship between the terms and how to determine if a control structure functions properly.”

Discuss the relationship between the terms and how to determine if a control structure functions properly.

Click the purchase button to get full answer.

Open chat
Hello
Contact us here via WhatsApp