IN JAVA
In the numbered lines of code below,
Identify all the examples of the following, stating the
line number(s) on which they occur:
(i) messages are sent
(ii) reference variables are declared
(iii) primitive variables are declared
(iv) object construction
(v) operators are used
(vi) formal arguments are declared
(vii) actual arguments are used
*****JAVA CODE TO USE *********
Location b1; // 1
b1 = new Location ("Kent", "The Alexander Centre"); // 2
Location b2; // 3
b2 = new Location ("Dorset", "Wessex fm Studios"); // 4
Dancer.minPayRate = 9.50; // 5
Performer p1 = new Dancer("This Person"); // 6
Performer p2 = new Dancer("Crazy Mike"); // 7
p1.setRate(10.00); // 8
p2.setRate(20.00); // 9
p1.setBranch(b1); // 10
p2.setBranch(b1); // 11
System.out.println(p1.isInSameLocationAs(p2)); // 12
IN JAVA In the numbered lines of code below, Identify all the examples of the following, stating the line number(s) on w
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am