Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Codveda | Java Development Internship

☕ A small Java practice project with exercises from beginner to advanced level.

This project includes simple console programs, file handling examples, a binary tree exercise, a chat app, and a library system connected to MySQL.

Internship Status

  • Level 1 (Basic): ✅ 2/2 Tasks Completed (Factorial, Guessing Game) [5, 6]
  • Level 2 (Intermediate): ✅ 2/2 Tasks Completed (Employee System, File Processor) [7, 8]
  • Level 3 (Advanced): ✅ 3/2 Tasks Completed (Binary Tree, Library System, Chat Service) [9, 10]

Contents

Basic exercises

Factorial Task

A small program that calculates the factorial of a non-negative number.

Run it:

javac -d bin level_1_Basic\FactorialTask.java
java -cp bin level_1_Basic.FactorialTask

Example:

Enter a positive number: 5
The factorial of 5 is: 120

Guessing Game

A simple number guessing game with limited attempts.

Run it:

javac -d bin level_1_Basic\GuessingGame.java
java -cp bin level_1_Basic.GuessingGame

Intermediate exercises

Employee System

A small employee manager that stores records in memory and lets you add, view, update, and delete them.

Run it:

javac -d bin levl_2_Intermediate\EmployeeSystem.java
java -cp bin EmployeeSystem

File Processor

A program that reads a text file, counts lines and words, and writes the result to an output file.

Run it:

javac -d bin levl_2_Intermediate\FileProcessor.java
java -cp bin FileProcessor

Advanced exercises

Binary Tree

A basic binary search tree example with insert, search, and traversal operations.

Run it:

javac -d bin level_3_Advanced\BinaryTree.java
java -cp bin BinaryTree

Library System

A small console app that connects to MySQL and lets you add books and view them.

Run it:

javac -cp ".\level_3_Advanced\lib\mysql-connector-j-9.6.0.jar" -d ".\bin" ".\level_3_Advanced\LibrarySystem.java"
java -cp ".\bin;.\level_3_Advanced\lib\mysql-connector-j-9.6.0.jar" level_3_Advanced.LibrarySystem

Chat Service

A basic chat app with a server and a client using sockets.

Run the server:

javac -d bin level_3_Advanced\ChatServer.java
java -cp bin level_3_Advanced.ChatServer

Run the client:

javac -d bin level_3_Advanced\ChatClient.java
java -cp bin level_3_Advanced.ChatClient

MySQL

The library app connects to a MySQL database called codveda. Start the database first and create the table used by the app.

Start the database with Docker:

docker compose -f infractrusture/docker-compose.yml up -d

Open the MySQL shell:

docker exec -it mysql_codveda mysql -u root -proot

Create the database and table:

CREATE DATABASE IF NOT EXISTS codveda;
USE codveda;

CREATE TABLE IF NOT EXISTS books (
    id INT AUTO_INCREMENT PRIMARY KEY,
    title VARCHAR(100) NOT NULL,
    author VARCHAR(100) NOT NULL
);

The Java program expects these connection values:

  • host: localhost
  • port: 3306
  • database: codveda
  • user: root
  • password: root

Optional sample data:

INSERT INTO books (title, author) VALUES ('Clean Code', 'Robert C. Martin');
INSERT INTO books (title, author) VALUES ('Effective Java', 'Joshua Bloch');

If you get a connection error, check that Docker is running, the container is active, and the books table exists.

Tools used

Java, MySQL, and Docker.

About the project

This project was built by Alejandro Fuentes for the Codeva Java Development internship.

🔗 Connect & Support

This project is part of my journey with @Codveda.

#CodvedaJourney #CodvedaExperience #FutureWithCodveda #CodvedaAchievements #CodvedaProjects

About

Java Development Internship projects for Codveda. Includes basic, intermediate, and advanced tasks like Library Management (JDBC/MySQL), Chat App (Sockets), and more

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages