Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Campus Course & Records Manager (CCRM)

A comprehensive Java SE application for managing students, courses, enrollments, and academic records. This project demonstrates advanced Java programming concepts including OOP principles, design patterns, file I/O operations, and modern Java features.

Project Overview

The Campus Course & Records Manager (CCRM) is a console-based Java application that allows educational institutions to manage:

  • Students: Create, update, enroll/unenroll in courses, view profiles and transcripts
  • Courses: Create, update, list, search, and assign instructors
  • Grades & Transcripts: Record marks, compute GPA, generate transcripts
  • File Operations: Import/export CSV files, backup/restore data
  • Reports: Generate GPA distribution, top students, enrollment summaries

Key Features

  • Menu-driven console interface
  • CSV import/export functionality
  • Automated backup system with timestamped folders
  • GPA calculation and transcript generation
  • Advanced search and filtering capabilities
  • Robust error handling and validation

How to Run

Prerequisites

  • Java Development Kit (JDK) 8 or higher
  • Windows/Linux/macOS operating system
  • Terminal/Command Prompt access

Running the Application

  1. Navigate to your project root folder:

    cd c:\Users\ekagr\Downloads\CCRM
  2. Compile the Java source files:

    javac -d out -sourcepath src src\edu\ccrm\cli\CCRMApplication.java

    This will compile your code and put the .class files in the out directory.

  3. Run the application:

    java -cp out edu.ccrm.cli.CCRMApplication

https://github.com/ekagrazi/Campus-Course-Records-Manager/blob/main/screenshots/01Start.png

Running with Assertions

java -ea -cp out edu.ccrm.cli.CCRMApplication

Note: Make sure to have Java (JDK) installed and javac/java are available in your PATH.

Evolution of Java

  • 1995: Java 1.0 - Initial release by Sun Microsystems, "Write Once, Run Anywhere"
  • 1997: Java 1.1 - Inner classes, JDBC, RMI, reflection
  • 1998: Java 1.2 (J2SE) - Swing GUI, Collections Framework, strictfp
  • 2000: Java 1.3 - HotSpot JVM, JNDI, Java Sound API
  • 2002: Java 1.4 - Assertions, regular expressions, NIO, XML processing
  • 2004: Java 5 - Generics, annotations, enums, autoboxing, enhanced for-loop
  • 2006: Java 6 - Scripting API, web services, compiler API
  • 2011: Java 7 - Try-with-resources, diamond operator, strings in switch
  • 2014: Java 8 - Lambda expressions, Stream API, Date/Time API, default methods
  • 2017: Java 9 - Module system (Jigsaw), JShell, private interface methods
  • 2018: Java 11 LTS - HTTP client, local variable type inference (var)
  • 2021: Java 17 LTS - Sealed classes, pattern matching, text blocks
  • 2023: Java 21 LTS - Virtual threads, pattern matching enhancements

Java Editions Comparison

Feature Java ME (Micro Edition) Java SE (Standard Edition) Java EE (Enterprise Edition)
Target Platform Mobile devices, IoT, embedded systems Desktop applications, standalone programs Enterprise web applications, servers
Size Minimal footprint (< 1MB) Standard size (~100-200MB) Large footprint (200MB+)
Core APIs Basic APIs (CLDC, MIDP) Full Java core APIs SE APIs + Enterprise APIs
Runtime KVM (Kilobyte Virtual Machine) Standard JVM Application servers (Tomcat, WebLogic)
Use Cases Smart cards, sensors, mobile apps Desktop GUI apps, utilities, games Web applications, distributed systems, microservices
Key Technologies Limited UI, basic networking Swing/JavaFX, full networking, file I/O Servlets, JSP, EJB, JPA, CDI, REST services
Development Complexity Simple, resource-constrained Moderate, full-featured Complex, enterprise-scale

My Project Uses: Java SE - Perfect for desktop applications with full access to Java's core APIs, file system operations, and advanced language features.

Java Architecture: JDK, JRE, JVM

JVM (Java Virtual Machine)

  • What it is: The runtime engine that executes Java bytecode
  • Role: Provides platform independence by converting bytecode to native machine code
  • Key Features: Memory management, garbage collection, security, exception handling
  • Platform-specific: Different JVM implementations for Windows, Linux, macOS

JRE (Java Runtime Environment)

  • What it is: Complete runtime environment for running Java applications
  • Components: JVM + Core Java libraries + Supporting files
  • Target Users: End users who need to run Java applications
  • Contents: rt.jar, charsets.jar, and other essential runtime libraries

JDK (Java Development Kit)

  • What it is: Complete software development kit for Java development
  • Components: JRE + Development tools + Documentation
  • Target Users: Java developers and programmers
  • Tools Included: javac (compiler), jar (archiver), javadoc (documentation), debugger

How They Interact

Source Code (.java) → [JDK javac] → Bytecode (.class) → [JRE JVM] → Native Machine Code
  1. Development Phase: Write Java source code (.java files)
  2. Compilation: JDK's javac compiler converts source to bytecode (.class files)
  3. Execution: JRE's JVM loads and executes bytecode
  4. Runtime: JVM translates bytecode to platform-specific machine code

Windows Installation Steps

Step 1: Download JDK

  1. Visit Oracle JDK Downloads or OpenJDK
  2. Select Windows platform and x64 architecture
  3. Download the latest LTS version (Java 17 or Java 21 recommended)

Step 2: Install JDK

  1. Run the downloaded .exe installer as Administrator
  2. Click "Next" through the installation wizard
  3. Note the installation directory (typically C:\Program Files\Java\jdk-21)
  4. Complete the installation

Step 3: Set Environment Variables

  1. Open System Properties:

    • Right-click "This PC" → Properties → Advanced System Settings
    • OR Press Win + R, type sysdm.cpl, press Enter
  2. Click Environment Variables

  3. Set JAVA_HOME:

    • Under "System Variables", click "New"
    • Variable name: JAVA_HOME
    • Variable value: C:\Program Files\Java\jdk-21
  4. Update PATH:

    • Find "Path" in System Variables, click "Edit"
    • Click "New" and add: %JAVA_HOME%\bin

Step 4: Verify Installation

Open Command Prompt and run:

java -version

https://github.com/ekagrazi/Campus-Course-Records-Manager/blob/main/screenshots/08Version.png

Technical Features Mapping Table

Syllabus Topic File/Class Method/Location Demonstration
OOP Principles
Encapsulation Person.java, Student.java Private fields + getters/setters Data hiding with controlled access
Inheritance Person.javaStudent.java, Instructor.java Class extension with extends Abstract base class implementation
Abstraction Person.java, Persistable.java Abstract methods, interfaces getRole(), getDetailedProfile()
Polymorphism StudentService.java, TranscriptService.java Interface implementations Method overriding, runtime binding
Classes & Objects
Class Definition All domain classes Class declarations Complete class structure
Object Creation CCRMApplication.java new Student.Builder().build() Constructor usage, Builder pattern
Method Overloading Student.java enrollInCourse() variants Multiple method signatures
Method Overriding Person.java subclasses toString(), getRole() Parent method redefinition
Advanced OOP
Abstract Classes Person.java abstract class Person Cannot be instantiated
Interfaces Persistable.java, Searchable.java Interface definitions Contract specification
Static Nested Class Person.java Person.Validator Utility class inside Person
Inner Class Student.java AcademicStats Access to outer class members
Anonymous Class StudentService.java getActiveStudents() Anonymous Comparator
Design Patterns
Singleton AppConfig.java getInstance() Thread-safe single instance
Builder Student.java, Course.java Builder nested class Fluent object construction
Data Types & Variables
Primitive Types Various classes int, double, boolean fields All primitive demonstrations
Reference Types All classes Object references String, collections, custom objects
Final Variables CourseCode.java final fields Immutable class design
Static Variables EnrollmentService.java MAX_CREDITS_PER_SEMESTER Class-level constants
Control Structures
If-Else CCRMApplication.java Menu choice handling Conditional execution
Switch Statement CCRMApplication.java runMainMenu() Multiple choice selection
Enhanced Switch CCRMApplication.java Menu processing Modern switch syntax
While Loop CCRMApplication.java mainLoop: Condition-controlled iteration
For Loop Various service classes Collection iterations Counter-controlled loops
Enhanced For CCRMApplication.java for (Student student : students) Iterator-based loops
Break/Continue CCRMApplication.java break mainLoop, continue Loop control statements
Labeled Break CCRMApplication.java break mainLoop Named loop exit
Arrays & Collections
Arrays Validators.java String array processing Array operations
ArrayList Service classes List<Student> Dynamic arrays
HashMap StudentService.java Map<String, Student> Key-value storage
Set Collections Student.java Set<String> enrolledCourses Unique element storage
Stream Operations Service classes .filter(), .map(), .collect() Functional programming
String Handling
String Methods Validators.java trim(), toLowerCase(), contains() String manipulation
String Comparison Various classes equals(), compareTo() String equality/ordering
StringBuilder TranscriptService.java StringBuilder transcript Efficient string building
Regular Expressions Validators.java Pattern.compile(), matches() Pattern matching
Exception Handling
Try-Catch CCRMApplication.java Menu input handling Exception catching
Finally Block ImportExportService.java Resource cleanup Guaranteed execution
Multi-Catch Various classes catch (IOException | RuntimeException e) Multiple exception types
Custom Exceptions EnrollmentService.java DuplicateEnrollmentException User-defined exceptions
Checked Exceptions EnrollmentService.java DuplicateEnrollmentException Compile-time checking
Unchecked Exceptions EnrollmentService.java MaxCreditLimitExceededException Runtime exceptions
Throw/Throws Various classes Exception propagation Manual exception throwing
File I/O
NIO.2 Path API ImportExportService.java Paths.get(), Files.exists() Modern file operations
File Reading ImportExportService.java Files.lines() Stream-based reading
File Writing ImportExportService.java Files.write() Stream-based writing
Directory Operations BackupService.java Files.walk(), Files.copy() Directory traversal
Generics
Generic Classes Persistable<T>, Searchable<T> Type parameters Type-safe collections
Generic Methods Service classes <T> List<T> search(Predicate<T>) Parameterized methods
Wildcards Collection handling List<? extends Person> Flexible type bounds
Lambda Expressions
Lambda Syntax Service classes s -> s.getName().contains(filter) Functional interfaces
Method References Service classes Student::calculateGPA Method reference syntax
Functional Interfaces Service classes Predicate<Student>, Comparator<Student> Lambda targets
Stream API
Stream Creation Service classes list.stream() Stream generation
Intermediate Operations Service classes .filter(), .map(), .sorted() Stream transformation
Terminal Operations Service classes .collect(), .forEach(), .reduce() Stream consumption
Collectors Service classes Collectors.toList(), Collectors.groupingBy() Collection assembly
Date/Time API
LocalDateTime Person.java, Student.java Timestamp creation Modern date handling
Formatting ImportExportService.java DateTimeFormatter.ofPattern() Date formatting
Enums
Basic Enum Semester.java, Grade.java Enum declarations Constant definitions
Enum with Fields Grade.java Constructor, methods Rich enum implementation
Enum Methods Semester.java getCurrentSemester() Enum behavior
Recursion
Mathematical RecursiveUtils.java factorial(), fibonacci() Classic recursion
File System RecursiveUtils.java listFilesRecursively() Directory traversal
Assertions
Assertion Statements Person.java, Student.java assert conditions Runtime verification
Annotations
Override All classes @Override Compiler checking
Package Structure
Package Declaration All classes package edu.ccrm.domain; Code organization
Import Statements All classes import java.util.*; Dependency management

Enabling Assertions

What are Assertions?

Assertions are debugging aids that test assumptions about program state. They help catch bugs during development but can be disabled in production for performance.

Assertion Syntax

assert condition : "Error message";
assert studentId != null : "Student ID cannot be null";
assert gpa >= 0.0 && gpa <= 4.0 : "GPA must be between 0.0 and 4.0";

Enabling Assertions

Command Line Options

# Enable assertions
java -ea MyProgram
java -enableassertions MyProgram

For CCRM Application

# Run with all assertions enabled
java -ea -cp out edu.ccrm.cli.CCRMApplication

Assertion Examples in CCRM

The project includes strategic assertions in several locations:

Person.java - Constructor validation:

assert id != null && !id.trim().isEmpty() : "ID cannot be null or empty";
assert email != null && email.contains("@") : "Valid email required";

Student.java - Business rule validation:

assert gpa >= 0.0 && gpa <= 4.0 : "GPA must be between 0.0 and 4.0";

Course.java - Credit validation:

assert credits >= 1 && credits <= 6 : "Credits must be between 1 and 6";

Demo Workflow

  1. Start Application: Run with assertions enabled
  2. Add Sample Data: Use the initialized sample students and courses
  3. Enroll Students: Demonstrate enrollment with business rule validation
  4. Record Grades: Add grades and see GPA calculations
  5. Generate Reports: View GPA distribution and top students
  6. File Operations: Export data and create backups
  7. View Results: Check generated files and backup directories

https://github.com/ekagrazi/Campus-Course-Records-Manager/blob/main/screenshots/02AddStudent.png https://github.com/ekagrazi/Campus-Course-Records-Manager/blob/main/screenshots/04StudentList.png https://github.com/ekagrazi/Campus-Course-Records-Manager/blob/main/screenshots/06AddGrade.png https://github.com/ekagrazi/Campus-Course-Records-Manager/blob/main/screenshots/07Report.png https://github.com/ekagrazi/Campus-Course-Records-Manager/blob/main/screenshots/10BackUp.png https://github.com/ekagrazi/Campus-Course-Records-Manager/blob/main/screenshots/03GradeMan.png

Contributing

This is an educational project demonstrating Java concepts. Feel free to extend functionality or improve implementations while maintaining the core learning objectives.

License

This project is for educational purposes. Feel free to use and modify for learning Java programming concepts.


Created as part of Java SE programming coursework to demonstrate advanced Java concepts and real-world application development.

About

Campus Course & Records Manager - Java SE application demonstrating advanced Java concepts including OOP, design patterns, file I/O, and modern Java features

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages