Hugging Face
Models
Datasets
Spaces
Buckets
new
Docs
Enterprise
Pricing
Website
Tasks
HuggingChat
Collections
Languages
Organizations
Community
Blog
Posts
Daily Papers
Learn
Discord
Forum
GitHub
Solutions
Team & Enterprise
Hugging Face PRO
Enterprise Support
Inference Providers
Inference Endpoints
Storage Buckets
Log In
Sign Up
Spaces:
KaiquanMah
/
TurkuBasicOOPinJava
like
0
Running
App
Files
Files
Community
main
TurkuBasicOOPinJava
/
Week 5: Class hierarchies
78.6 kB
Ctrl+K
Ctrl+K
1 contributor
History:
27 commits
KaiquanMah
catch (CustomException e)
dcba1b0
verified
11 months ago
01A. Class hierarchies
2.32 kB
Parent-Ancestor vs Child; super vs sub
11 months ago
01B Inheritance relationships
572 Bytes
Create 01B Inheritance relationships
11 months ago
02A Inheritance in Java
1.44 kB
class SubClass1 extends ParentClass { }
11 months ago
02B. Boat's inheritors
1.26 kB
Create 02B. Boat's inheritors
11 months ago
03A. Adding features to child class
4.61 kB
setParentAttribute(value1) OR super(value1, ...)
11 months ago
03B. Thesis inherits book
2.89 kB
Create 03B. Thesis inherits book
11 months ago
04. James' video calls
4.07 kB
Create 04. James' video calls
11 months ago
05A. Encapsulation and inheriting [++Attribute's 4 visibility levels]
3.08 kB
public, protected, no set level, private
11 months ago
05B. Modifiable point
1.95 kB
super(x,y);
11 months ago
06. Class gradebook
2.37 kB
this.attr1 = new ArrayList<Class1>();
11 months ago
07A. Overwrite and override [Overwrite - METHOD, PARAMS]
1.5 kB
Overwrite - METHOD, PARAMS
11 months ago
07B. Corresponding methods
611 Bytes
Create 07B. Corresponding methods
11 months ago
08. Write class SpecialDirector
2.75 kB
Create 08. Write class SpecialDirector
11 months ago
09A. Calling parent class methods [ENCAPSULATION]
2.23 kB
child class method overwrites parent class method
11 months ago
09B. Organic version of a shopping list
4.6 kB
String var1 = super.method1();
11 months ago
10A. OVERLOADING AND OVERRIDING methods [= same method, multiple param nums AND dtypes]++
3.27 kB
same method, multiple param nums AND dtypes
11 months ago
10B. Better wallet
3.49 kB
constructor-super, new methods2-3
11 months ago
11A. About parent class constructor++
4.18 kB
MULTIPLE CONSTRUCTORS, EMPTY CONSTRUCTOR
11 months ago
11B. Encrypted connection
4.31 kB
super(param1); this(defaultParam2);
11 months ago
12A. Object-class methods - toString()
3.88 kB
@Override above the method
11 months ago
12B. Add a method toString
2.24 kB
return <ur printout>
11 months ago
13A. equals Method
3.01 kB
this == obj; OR Class1 var1 = (Class1) obj1; (x == obj1.x && y == obj1.y);
11 months ago
13B. Equals method for class Movie [4 basic chks]
2.92 kB
chk same obj, not null, not expected class, values
11 months ago
14A. More exercises: Custom Exceptions+++
2.13 kB
class CustomException extends Exception
11 months ago
14B. Own Exceptions 1: SuperException
734 Bytes
public CustomException(String msg) { super(msg); }
11 months ago
15. Own Exceptions 2: SuperGroup+++
9.42 kB
public void method1(Class1 obj1) throws CustomException, throw new CustomException("txt...")
11 months ago
16. Own Exceptions 3: Catching Exceptions
2.76 kB
catch (CustomException e)
11 months ago