# java **Repository Path**: qeh996/java ## Basic Information - **Project Name**: java - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-11-07 - **Last Updated**: 2025-11-14 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Java Project Description This is a Java-based student information management system that supports adding, deleting, updating, and querying student information, along with data persistence functionality. ## Features - **Student Management**: Add, delete, update, and query student information. - **Operation History**: Records recent operations and supports viewing the last 10 operation logs. - **Data Persistence**: Supports saving student data to text files (`.txt`) or binary files (`.dat`), and loading data from these files. ## Class Structure - `Student`: Student class containing student ID, name, major, and address information. - `Address`: Address class containing province, city, and street information. - `StudentManager`: Student management class implementing CRUD operations and data persistence. - `AddCommand`, `DeleteCommand`, `UpdateCommand`: Command classes implementing corresponding operations. - `TxtStorage`, `DatStorage`: Classes implementing read/write functionality for text and binary files, respectively. - `Main`: Program entry point. ## Usage 1. Compile all Java files. 2. Run the `Main` class to start the program. 3. Use the command-line interface to manage student information. ## Data Storage - Supports saving student data in either text or binary file format. - Default filenames: `students.txt` (text format) and `students.dat` (binary format). ## Developer Information This project is designed for learning purposes and is suitable for Java beginners to understand object-oriented programming, file handling, and basic design patterns. \ No newline at end of file +33 README.md 0 -> 100644 # Java 项目说明 这是一个基于 Java 的学生信息管理项目,支持添加、删除、更新和查询学生信息,并提供数据持久化功能。 ## 功能特性 - **学生管理**:添加、删除、更新和查询学生信息。 - **操作记录**:记录最近的操作,支持查看最近的10条操作记录。 - **数据持久化**:支持将学生数据保存到文本文件(`.txt`)或二进制文件(`.dat`),并能从这些文件中加载数据。 ## 类结构说明 - `Student`:学生类,包含学号、姓名、专业和地址信息。 - `Address`:地址类,包含省、市、街道信息。 - `StudentManager`:学生管理类,实现学生信息的增删改查及数据持久化。 - `AddCommand`、`DeleteCommand`、`UpdateCommand`:实现对应操作的命令类。 - `TxtStorage`、`DatStorage`:分别实现文本文件和二进制文件的读写功能。 - `Main`:程序入口。 ## 使用方法 1. 编译所有 Java 文件。 2. 运行 `Main` 类启动程序。 3. 使用命令行界面进行学生信息管理操作。 ## 数据存储 - 支持将学生数据保存为文本文件或二进制文件。 - 默认文件名为 `students.txt`(文本格式)和 `students.dat`(二进制格式)。 ## 开发者信息 该项目为学习用途设计,适合 Java 初学者理解面向对象编程、文件操作和简单的设计模式。