Skip to content

Add three Java mini-projects: calculator, inventory manager, and student grader#1

Draft
Copilot wants to merge 3 commits into
mainfrom
copilot/create-java-mini-project-structures
Draft

Add three Java mini-projects: calculator, inventory manager, and student grader#1
Copilot wants to merge 3 commits into
mainfrom
copilot/create-java-mini-project-structures

Conversation

Copy link
Copy Markdown

Copilot AI commented Oct 25, 2025

Implements three standalone Java applications demonstrating core programming concepts: arithmetic operations with error handling, collection-based data management, and statistical computation with formatting.

Projects

SimpleCalculator (127 lines)

  • Binary arithmetic operations (+, -, *, /) via switch statement
  • Division-by-zero and invalid operator validation

SimpleInventoryManager (242 lines)

  • ArrayList-backed CRUD operations for inventory items
  • Menu-driven interface with negative value validation

BasicStdtGrdr (210 lines)

  • Five-score average calculation and letter grade assignment (A-F)
  • Formatted tabular output with class statistics
  • Score range validation (0-100)

Example Usage

// SimpleCalculator
Enter first number: 10
Enter operator (+, -, *, /): /
Enter second number: 0
Error: Division by zero is not allowed!

// SimpleInventoryManager (menu option 1)
Enter item name: Laptop
Enter item price: $-999.99
Error: Price cannot be negative!

// BasicStdtGrdr
Enter 5 test scores:
Score 1: 95
Score 2: 105
Error: Score must be between 0 and 100! Please re-enter data for this student.

Each project includes compilation/execution instructions in dedicated README files.

Original prompt

Create structure for three Java mini-projects (70+ lines each):

  1. SimpleCalculator: CMD calculator (2 nums, 1 op). Must use a switch. Error check for division by zero and invalid operators.
  2. SimpleInventoryManager: Menu-driven inventory using a Java Collection. Core functions: Add, View, Update Stock, Remove items.
  3. BasicStdtGrdr: Input names/ five scores. Calculates average and assigns letter grade (A-F). Outputs formatted results table

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits October 25, 2025 10:08
Co-authored-by: AnantSinghTanwar-ux <193122409+AnantSinghTanwar-ux@users.noreply.github.com>
Co-authored-by: AnantSinghTanwar-ux <193122409+AnantSinghTanwar-ux@users.noreply.github.com>
Copilot AI changed the title [WIP] Create structure for three Java mini-projects Add three Java mini-projects: calculator, inventory manager, and student grader Oct 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants