Welcome to the FamilyThing project, a code multiverse revolving around family dynamics and interactions. Below you will find detailed release notes and version history, reflecting the evolution of the project over time.
- Features Added:
- Introduced
BogeyManto monitor whether pets have nicknames. - Pets without nicknames will be "taken away" by the BogeyMan.
- Introduced
- Main.java Updates:
- Implementation of HashMap to manage pet nicknames.
- Class Hierarchy:
- Family: Social Constructs.
- Features Added:
- Added Pet functionality with support for nicknames and a default name.
- Main.java Updates:
- Arrays utilized for managing multiple pets.
- Class Hierarchy:
- Maintained from previous versions.
- Features Added:
- Dynamic array growth as children are added.
- Introduced a space-time construct.
- Class Hierarchy:
- Same as previous versions.
- Release Notes:
- Initial release focusing on establishing a robust class hierarchy.
- Supported functions include listing siblings, parents, and genomes.
-
Family Package Requirements:
- Person Class: Private variables for gender (male or female).
- Father Class and Mother Class: Private variables include numChildren and children (as arrays).
- Genome Attributes: Father (X, Y), Mother (X1, X2).
-
Main.java Structure:
- Create two objects: Pavan and Prathima, and link them together.
- Add children (Nikhita to Pavan, Tejas to Prathima) and establish sibling linkage.
- Use Random function for selecting X Genome from mother to children.
-
Expected Outputs:
- Descriptions of children, parents, siblings, and genomes based on interactions between the objects.
- Classes:
Father,Mother,Person,Child,Son,Daughter,Parent.- Methods include
marry,addChild,describeParents,describeSiblings,describeGenome.
This project now supports both Java and Python implementations, allowing you to explore the same family dynamics concepts in different programming paradigms.
familything/
βββ java-version/ # Java implementation
β βββ Main.java
β βββ build.sh # Java build script
β βββ family/ # Family classes
β β βββ Person.java
β β βββ Parent.java
β β βββ Father.java
β β βββ Mother.java
β β βββ Child.java
β β βββ Son.java
β β βββ Daughter.java
β β βββ Pet.java
β βββ SocialConstructs/ # Social construct classes
β βββ Spacetime.java
β βββ BogeyMan.java
βββ python-version/ # Python implementation
β βββ main.py
β βββ run.py # Python run script
β βββ requirements.txt
β βββ family/ # Family classes
β β βββ __init__.py
β β βββ person.py
β β βββ parent.py
β β βββ father.py
β β βββ mother.py
β β βββ child.py
β β βββ son.py
β β βββ daughter.py
β β βββ pet.py
β βββ social_constructs/ # Social construct classes
β βββ __init__.py
β βββ spacetime.py
β βββ bogey_man.py
βββ shared/ # Shared resources
βββ build-all.sh # Master build script
βββ build.sh # Legacy Java build script
βββ Makefile # Legacy Makefile
βββ setup-mac.sh # Mac setup script
βββ .vscode/ # VS Code configuration
βββ tasks.json
βββ launch.json
The master build script can handle both Java and Python versions:
# Build and run both versions
./build-all.sh both
# Build and run Java version only
./build-all.sh java
# Build and run Python version only
./build-all.sh python
# Run Java version (must be built first)
./build-all.sh run-java
# Run Python version
./build-all.sh run-python
# Clean all builds
./build-all.sh clean
# Show help
./build-all.sh helpJava Version:
cd java-version
./build.sh build # Clean, compile, and run
./build.sh compile # Only compile
./build.sh run # Only run
./build.sh clean # Clean build artifactsPython Version:
cd python-version
python3 main.py # Run directly
python3 run.py # Run with setup script- Open Command Palette (
Ctrl+Shift+PorCmd+Shift+P) - Select "Tasks: Run Task"
- Choose from available tasks:
Build and Run- Compile and run Java projectCompile Java Project- Only compile JavaRun Java Project- Only run JavaClean Build- Clean Java build artifacts
- Java 17 or higher
- Works in GitHub Codespaces (automatically configured)
- Works in VS Code Web
- Works in any Linux/macOS environment with Java installed
- Python 3.6 or higher
- No external dependencies required
- Works in any environment with Python 3
- Multi-language Support: Build and run both Java and Python versions
- Smart Detection: Automatically detects available languages
- Colored Output: Different colors for Java and Python operations
- Error Handling: Comprehensive error checking and reporting
- Flexible Commands: Individual or combined language support
- Automatic Java Installation: Build script installs Java if needed
- Colored Output: Build script provides colored status messages
- Error Handling: Comprehensive error checking and reporting
- VS Code Integration: Full integration with VS Code tasks and debugging
- GitHub Codespaces Ready: Pre-configured for seamless development
- Pure Python: No external dependencies required
- Modern Python: Uses type hints and modern Python features
- Clean Architecture: Well-structured packages and modules
- Cross-platform: Works on any system with Python 3
Both implementations provide the same functionality but with language-specific features:
| Feature | Java Version | Python Version |
|---|---|---|
| Type Safety | Strong static typing | Type hints with mypy |
| Inheritance | Class-based inheritance | Class-based inheritance |
| Collections | Arrays, HashMap | Lists, Dictionaries |
| Enums | Java enums | Python enums |
| Package Structure | Java packages | Python packages |
| Build System | Custom build script | Direct Python execution |
This project has been adapted for modern development environments including GitHub Codespaces and VS Code Web, while maintaining all original functionality.
familything/
βββ Main.java # Main application entry point
βββ family/ # Family-related classes
β βββ Person.java
β βββ Parent.java
β βββ Father.java
β βββ Mother.java
β βββ Child.java
β βββ Son.java
β βββ Daughter.java
β βββ Pet.java
βββ SocialConstructs/ # Social construct classes
β βββ Spacetime.java
β βββ BogeyMan.java
βββ build.sh # Build script for compilation and running
βββ Makefile # Alternative build system
βββ .vscode/ # VS Code configuration
βββ tasks.json # Build tasks
βββ launch.json # Debug configurations
-
Open in Codespaces: Click the "Code" button on your GitHub repository and select "Open with Codespaces"
-
Run the application:
./build.sh
This will automatically:
- Check for Java installation
- Clean previous builds
- Compile all Java files
- Run the application
-
Other build script commands:
./build.sh compile # Only compile ./build.sh run # Only run (must be compiled first) ./build.sh clean # Clean build artifacts ./build.sh help # Show help
-
Compile and run:
make
-
Other make commands:
make compile # Only compile make run # Only run make clean # Clean build artifacts make help # Show help
- Open Command Palette (
Ctrl+Shift+PorCmd+Shift+P) - Select "Tasks: Run Task"
- Choose one of the available tasks:
Build and Run- Compile and run the projectCompile Java Project- Only compileRun Java Project- Only runClean Build- Clean build artifacts
- Set breakpoints in your Java code
- Press F5 or go to Run and Debug panel
- Select "Debug Main" configuration
- Start debugging - the project will compile and run in debug mode
If you prefer to compile manually:
# Create build directory
mkdir -p build
# Compile packages in dependency order
javac -d build SocialConstructs/*.java
javac -cp build -d build family/*.java
javac -cp build -d build Main.java
# Run the application
java -cp build Main- Java 17 or higher
- Works in GitHub Codespaces (automatically configured)
- Works in VS Code Web
- Works in any Linux environment with Java installed
- Automatic Java Installation: The build script automatically installs Java if not present
- Colored Output: Build script provides colored status messages
- Error Handling: Comprehensive error checking and reporting
- VS Code Integration: Full integration with VS Code tasks and debugging
- GitHub Codespaces Ready: Pre-configured for seamless development in Codespaces
If you get a "Java not found" error, the build script will automatically install OpenJDK 17. If manual installation is needed:
sudo apt-get update
sudo apt-get install -y openjdk-17-jdkIf you get a permission error when running the build script:
chmod +x build.shIf you encounter compilation errors:
- Check that all Java files are present
- Ensure proper package declarations
- Run
./build.sh cleanto clean previous builds - Try compiling again
This project was originally developed in BlueJ and has been adapted for modern development environments. The build scripts handle the compilation order and classpath management that BlueJ would normally handle automatically.
This documentation is designed to provide a comprehensive overview of the FamilyThing project, guiding both current users and developers through the functionalities and internal structure of the application.