-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME.txt
More file actions
129 lines (100 loc) · 4 KB
/
README.txt
File metadata and controls
129 lines (100 loc) · 4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
# ✅ Java TO-DO List Application
Interactive command-line TODO list application built in Java, demonstrating fundamental programming concepts and clean code practices.
## 🚀 Features
- Add tasks with name and description
- Edit existing tasks
- Delete tasks from list
- Mark tasks as completed
- View all tasks with status indicators
- Input validation with error handling
- User-friendly interface with emojis and clear formatting
## Demo
```
Vítej v aplikaci TO-DO-LIST
=====SEZNAM ÚKOLŮ=====
[○] Nakoupit potraviny – Mléko, chléb, vajíčka
[✓] Dokončit projekt – Java TO-DO aplikace
[○] Zavolat doktorovi – Objednat se na kontrolu
1# Přidat | 2# Upravit | 3# Smazat | 4# Hotovo | 5# Konec
```
## 🛠️ Technologies Used
- **Java 17+** - Core programming language
- **Collections Framework** - ArrayList for task storage
- **Exception Handling** - InputMismatchException, NumberFormatException
- **Object-Oriented Programming** - Classes, encapsulation, methods
- **Input Validation** - Custom validator class with error handling
## Project Structure
```
src/
├── ovadek/todolist/
│ ├── Main.java # Main application class with UI
│ ├── Task.java # Task entity with properties
│ └── InputValidator.java # Input validation utilities
```
## 🎯 Key Programming Concepts Demonstrated
- **Object-Oriented Design** - Task class with encapsulation
- **Collections Management** - ArrayList operations (CRUD)
- **Exception Handling** - Try-catch blocks for user input
- **Input Validation** - Custom validator methods
- **String Formatting** - Professional output formatting
- **Method Separation** - Clean, single-responsibility methods
## How to Run
**Clone the repository**
```bash
git clone https://github.com/JinderO/todo-list-java.git
cd todo-list-java
```
**Compile the Java files**
```bash
javac -d bin src/ovadek/todolist/*.java
```
**Run the application**
```bash
java -cp bin ovadek.todolist.Main
```
## What I Learned
- **CRUD Operations** - Create, Read, Update, Delete functionality
- **Input Validation** - Handling edge cases and user errors
- **Collections Framework** - Working with ArrayList and iterations
- **Exception Handling** - Graceful error management
- **Code Organization** - Separating concerns into different classes
- **User Experience** - Creating intuitive command-line interfaces
## Potential Improvements
- Save tasks to file for persistence
- Add due dates and priorities
- Implement task categories
- Add search functionality
- Create GUI version
## Code Highlights
**Clean Input Validation:**
```java
public static int getValidInteger(String prompt, int min, int max) {
while(true) {
try {
int value = Integer.parseInt(scanner.nextLine().trim());
if (value >= min && value <= max) {
return value;
}
} catch (NumberFormatException e) {
System.out.println("❌ Zadej platné číslo");
}
}
}
```
**Professional toString() Implementation:**
```java
@Override
public String toString() {
return String.format("[%s] %s – %s",
(completed ? "✓" : "○"), name, description);
}
```
## 👨💻 Author
**Jindřich Ovádek** - *Java Developer in Training* - [@JinderO](https://github.com/JinderO)
### Technical Achievements
- **Strong OOP Foundation** - Demonstrates solid understanding of object-oriented principles
- **Clean Code Practices** - Readable, well-structured code with proper error handling
- **User-Focused Design** - Intuitive interface with comprehensive input validation
- **CRUD Mastery** - Complete implementation of data manipulation operations
- **Exception Handling** - Professional approach to error management and user feedback
This project showcases **fundamental Java programming skills** including **object-oriented design**, **collections management**, **exception handling**, and **user input validation**. The implementation demonstrates **strong foundational knowledge** essential for **Java developer** positions.