-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathClasses2.java
25 lines (21 loc) · 919 Bytes
/
Classes2.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/************************************************************/
/*Program: Classes2 */
/*CIS163AA 31892 */
/*Marc Holley */
/*4/10/2016 */
/*this program demonstrates classes */
/************************************************************/
import java.util.Scanner;
// Class that extends the paren class
public class Classes2 extends Classes {
// method with a pass by reference
public static void positiveOrNegative (int numInput) {
// conditional statement with logical operands
if (numInput > 0) {
System.out.println("Your number is positive.");
}
else {
System.out.println("Your number is negative.");
}
}
}