Hugging Face
Models
Datasets
Spaces
Community
Docs
Enterprise
Pricing
Log In
Sign Up
Spaces:
KaiquanMah
/
TurkuBasicOOPinJava
like
0
Running
App
Files
Files
Community
8e7d332
TurkuBasicOOPinJava
/
Week 6: Methods of OO Programming
45.8 kB
1 contributor
History:
13 commits
KaiquanMah
reusable method for SUPERCLASS n SUBCLASSES, ArrayList, SUPERCLASS METHOD
8e7d332
verified
4 months ago
01A. Static members [= CLASS MEMBER, not object member]
Safe
5.13 kB
public static dtype method1(param1) {...}
4 months ago
01B. Class StringHelper
Safe
2.15 kB
public static int method1(dtype param1)
4 months ago
02. Class SecretAgent
Safe
4.39 kB
if (staticMethod2(param1)) {...}
4 months ago
03A. Class variables = STATIC VARIABLES
Safe
2.21 kB
public static dtype STATICVARIABLEINCAPS = <value>;
4 months ago
03B. Nordic countries as class variables
Safe
728 Bytes
public static String FINLAND = "FI";
4 months ago
04. Fish within permitted limits
Safe
2.41 kB
this.attribute1 >= Class2.PUBLICSTATICATTRIBUTE2
4 months ago
05A. Interfaces+++
Safe
4.87 kB
interface INTERFACE1 {dtype method1();}
4 months ago
05B. Write an interface class Calculator
Safe
1.31 kB
void add(int number); double getResult();
4 months ago
06. The Calculator implements an interface
Safe
3.6 kB
@Override public void add(int number) {this.result += number;}
4 months ago
07A. Interface 'Comparable' [compareTo method]+++
Safe
4.99 kB
int/double, str (alphabetical)
4 months ago
07B. Determine the Longest Route
Safe
3.47 kB
@Override public int compareTo(Route other)
4 months ago
08. Comparable Point
Safe
3.21 kB
condition compares using double, then return int
4 months ago
09 Polymorphism+++
Safe
7.31 kB
reusable method for SUPERCLASS n SUBCLASSES, ArrayList, SUPERCLASS METHOD
4 months ago