Skip to content
aijazmirzzaPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

31 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CCRM

Campus Course & Records Manager (CCRM)1. Project OverviewThe Campus Course & Records Manager (CCRM) is a console-based Java application designed to manage academic records for an educational institute. It provides functionalities for managing students, courses, enrollments, and grades. The application also includes utilities for data persistence through file import/export and a backup system.This project is built using Java SE and demonstrates a wide range of core Java concepts, including Object-Oriented Programming (OOP), modern I/O with NIO.2, the Streams API, the Date/Time API, exception handling, and common design patterns.How to RunPrerequisites:Java Development Kit (JDK) 11 or higher.An IDE like Eclipse or IntelliJ IDEA (or you can use a text editor and the command line).Compilation & Execution:From an IDE:Import the project.Locate the CccrmApplication.java file in the edu.ccrm.cli package.Right-click and select "Run As" > "Java Application".From the Command Line:Navigate to the project's src directory.Compile the source code: javac edu/ccrm/cli/CccrmApplication.javaRun the application: java edu.ccrm.cli.CccrmApplicationEnabling Assertions:To run the application with assertions enabled (which is recommended to check for internal invariants), use the -ea VM flag.In Eclipse: Go to "Run" > "Run Configurations..." > Select your application > "Arguments" tab > In "VM arguments", enter -ea.From Command Line: java -ea edu.ccrm.cli.CccrmApplication2. Java Platform FundamentalsEvolution of Java (Abridged)1995: Java 1.0 released by Sun Microsystems. Slogan: "Write Once, Run Anywhere."1998: Java 2 (J2SE 1.2) released, introducing Swing, Collections, and JIT compilation.2004: Java 5 (J2SE 5.0) released with major features like Generics, Enums, Autoboxing, and Annotations.2011: Java 7 released with NIO.2 for better file I/O and the try-with-resources statement.2014: Java 8, a landmark release, introduced Lambda Expressions, the Stream API, and a new Date/Time API.2017: Java 9 introduced the Java Module System.2018: New six-month release cadence begins with Java 10 and 11 (LTS).Present: Java continues to evolve with regular releases, with recent LTS versions being 17 and 21.Java ME vs. SE vs. EEFeatureJava ME (Micro Edition)Java SE (Standard Edition)Java EE (Enterprise Edition)Primary UseResource-constrained devices (e.g., mobile, embedded)General-purpose desktop, server, and console applicationsLarge-scale, distributed, and web-based enterprise applicationsCore APIA subset of the Java SE API with specialized librariesThe core Java platform (lang, util, io, sql, etc.)Extends Java SE with APIs for web services, servlets, JPA, etc.Key ComponentsCLDC (Connected Limited Device Configuration)JDK (Compiler, Tools), JRE (JVM, Libraries)Application Servers (e.g., Tomcat, JBoss, WebSphere)Example AppSimple mobile games from the pre-smartphone era.This CCRM project, Minecraft (Java Edition), Eclipse IDE.E-commerce websites, banking applications, large corporate systems.Java Architecture: JDK, JRE, JVMJVM (Java Virtual Machine): The core component that executes Java bytecode. It is an abstract machine that provides a runtime environment. The JVM is platform-dependent, which is how Java achieves its platform independence ("Write Once, Run Anywhere").JRE (Java Runtime Environment): The software package that contains what is required to run a Java program. It includes the JVM, core libraries (like java.lang), and other supporting files. You would distribute the JRE with your application to a user.JDK (Java Development Kit): The full-featured software development kit for Java. It contains everything in the JRE, plus development tools like the compiler (javac), archiver (jar), and debugger (jdb). You need the JDK to write and compile Java programs.Interaction: A developer writes Java code (.java files), uses the JDK's compiler to turn it into bytecode (.class files), and then the JRE's JVM executes that bytecode on a specific operating system.3. Setup and Installation (Windows Example)Installing the JDKDownload the JDK installer from the official Oracle website or an alternative build like Adoptium (Eclipse Temurin).Run the installer and follow the on-screen instructions.Configure Environment Variables:Open "System Properties" > "Advanced" > "Environment Variables...".Create a new System variable JAVA_HOME pointing to the JDK installation directory (e.g., C:\Program Files\Java\jdk-17).Edit the Path variable and add a new entry: %JAVA_HOME%\bin.Verification: Open a new Command Prompt and run java -version and javac -version. You should see the installed version information.Setting up in Eclipse IDECreate a New Project: Go to "File" > "New" > "Java Project".Name the Project: Enter a project name (e.g., "CCRM").Configure JRE: Ensure the "Use an execution environment JRE" points to your installed JDK version.Create Packages: Right-click the src folder and select "New" > "Package" to create the required packages (edu.ccrm.cli, edu.ccrm.domain, etc.).Create Classes: Right-click a package and select "New" > "Class" to add your Java files.4. Syllabus Topic MappingSyllabus TopicFile / Class / Method LocationPackages & main classedu.ccrm.cli.CccrmApplication.java and overall project structure.Primitive Types & OperatorsEnrollmentService.calculateGPA() - demonstrates arithmetic operators.Decision Structures (if, switch)CliManager.run() - main application loop uses an enhanced switch.Loops (while, for, do-while)CliManager.run() (while loop), ImportExportService.importStudents() (for-each loop).Jump Control (break)CliManager.run() - break is used in the switch statement.Arrays & Arrays classCourseService.searchCourses() - demonstrates converting stream to array.Strings & MethodsImportExportService uses line.split(",").OOP: EncapsulationAll domain classes (Student, Course) use private fields with public getters/setters.OOP: InheritanceStudent.java and Instructor.java extend the abstract Person.java class.OOP: AbstractionPerson.java is an abstract class with an abstract method getProfileDetails().OOP: PolymorphismTranscriptService.printTranscript() - uses a Person reference to call getProfileDetails().super keywordStudent and Instructor constructors call super().Immutable Classdomain.CourseCode.java is an immutable value class.Nested Classes (static, inner)Course.java contains a public static class Builder. CliManager uses an inner class for demo.Interfacesservice.Searchable.java is a functional interface.Functional Interfaces & LambdasCourseService.searchCourses() uses a Predicate lambda for filtering.Anonymous Inner ClassesCliManager.handleAnonymousClassDemo() demonstrates this concept.Enums with Constructorsdomain.Semester.java and domain.Grade.java.Upcasting & DowncastingA Student object is upcast to Person. Checked downcasting is used in services.Overriding & OverloadingtoString() is overridden in all domain classes. Service methods are overloaded.Design Pattern: Singletonconfig.AppConfig.java and service.DataStore.java.Design Pattern: Builderdomain.Course.Builder nested class.Exceptions (Custom, try-catch)EnrollmentService.enrollStudent() throws custom exceptions; CliManager handles them.finally blockUsed in ImportExportService for resource management demonstration.Assertions (assert)EnrollmentService.recordMark() uses an assertion to check grade point validity.NIO.2: Path & FilesBackupService.performBackup() uses Files.createDirectories(), Files.copy().Streams API (I/O & Data)ImportExportService uses Files.lines(). CourseService uses streams for filtering.Date/Time APIBackupService uses LocalDateTime for timestamped folder names.Recursionutil.RecursiveUtil.calculateDirectorySize() recursively calculates folder size.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors