Last active
February 26, 2021 22:20
-
-
Save Rex-Ferrer/e521b8f19ddb85bf7fdcb75335a5c8cd to your computer and use it in GitHub Desktop.
[WIP] OOP practice - Brain Modeling
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Lobe {} | |
class Temporal implements Lobe {} | |
class Frontal implements Lobe { | |
MemoryProcessor processor; | |
Object process(Effortful memory){ | |
return processor.process(memory); | |
} | |
} | |
class Parietal implements Lobe {} | |
class Occipital implements Lobe {} | |
class Cortex {} | |
class Cerebral implements Cortex {} | |
class Cerebellar implements Cortex {} | |
class Thalamus {} | |
class Hypothalamus extends Thalamus {} | |
class Medulla {} | |
class Pons {} | |
class Hippocampus { | |
MemoryProcessor processor; | |
Object process(Effortful memory){ | |
return processor.process(memory); | |
} | |
} | |
class Brain { | |
Cerebrum cerebrum; | |
Cerebellum cerebellum; | |
Brainstem brainstem; | |
} | |
class Cerebrum { | |
Hemisphere left; | |
Hemisphere right; | |
} | |
class Hemisphere { | |
Frontal frontal; | |
Temporal temporal; | |
Parietal parietal; | |
Occipital occipital; | |
CorpusCallosum corpus_callosum; | |
} | |
class Cerebellum { | |
Cerebellar cortex; | |
MemoryProcessor processor; | |
Object process(Automatic memory){ | |
return processor.process(memory); | |
} | |
} | |
class BasalGanglia { | |
MemoryProcessor processor; | |
Object process(Automatic memory){ | |
return processor.process(memory); | |
} | |
} | |
class Brainstem {} | |
//Mediator type object | |
class CorpusCallosum {} | |
// Tagging interfaces. Need to reconsider this. Enums could be better | |
class Hind {} | |
class Mid {} | |
class Fore {} | |
class Right {} | |
class Left {} | |
abstract class Gland { | |
Object produce(); | |
Object release(); | |
} | |
abstract class Endocrine implements Gland {} | |
abstract class Exocrine implements Gland {} | |
class Pituitary implements Gland { | |
Object produce() { | |
return null; | |
} | |
Object release() { | |
return null; | |
} | |
} | |
class Pineal implements Gland { | |
Object produce() { | |
return null; | |
} | |
Object release() { | |
return null; | |
} | |
} | |
class Memory {} | |
class Automatic implements Memory{} | |
class Effortful implements Memory {} | |
class Explicit implements Effortful {} | |
class Implicit implements Automatic {} | |
abstract class Semantic implements Explicit {} | |
abstract class Episodic implements Explicit {} | |
// 1. This class could be implemented by Frontal Lobe/Hippocampus and Cerebellum/Basal Ganglia | |
// 2. Preferred Method: Composition. Each of those classes contains this as an object property | |
// 2a. Containing class will delegate to this class, but will require the appropriate type of Memory | |
class MemoryProcessor { | |
Object process(Memory memory){ | |
return null; | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment