package sample;
import java.util.ArrayList;
import java.util.Scanner;
public class TaskManager {
private static ArrayList<Task> tasks = new ArrayList<>();
private static Scanner scanner = new Scanner(System.in);
public static void main(String[] args) {
boolean running = true;
while (running) {
System.out.println("1. タスクの追加");
System.out.println("2. タスクの削除");
System.out.println("3. タスクの表示");
System.out.println("4. タスクの状態を変更");
System.out.println("5. 終了");
System.out.print("操作を選択してください: ");
int choice = scanner.nextInt();
scanner.nextLine(); // 改行を読み飛ばす
switch (choice) {
case 1:
addTask();
break;
case 2:
deleteTask();
break;
case 3:
displayTasks();
break;
case 4:
changeTaskStatus();
break;
case 5:
running = false;
break;
default:
System.out.println("無効な選択です。");
}
}
scanner.close();
}
private static void addTask() {
System.out.print("タスクの名前を入力してください: ");
String name = scanner.nextLine();
System.out.print("タスクの期限を入力してください (例: YYYY-MM-DD): ");
String deadline = scanner.nextLine();
System.out.print("タスクの優先度を入力してください (高/中/低): ");
String priority = scanner.nextLine();
tasks.add(new Task(name, deadline, priority));
System.out.println("タスクを追加しました。");
}
private static void deleteTask() {
if (tasks.isEmpty()) {
System.out.println("削除するタスクはありません。");
return;
}
System.out.println("削除するタスクを選択してください:");
displayTasks();
System.out.print("削除するタスクの番号を入力してください: ");
int index = scanner.nextInt();
scanner.nextLine(); // 改行を読み飛ばす
if (index < 1 || index > tasks.size()) {
System.out.println("無効な番号です。");
} else {
Task deletedTask = tasks.remove(index - 1);
System.out.println(deletedTask.getName() + " を削除しました。");
}
}
private static void displayTasks() {
if (tasks.isEmpty()) {
System.out.println("タスクはありません。");
} else {
System.out.println("現在のタスク:");
for (int i = 0; i < tasks.size(); i++) {
System.out.println((i + 1) + ". " + tasks.get(i));
}
}
}
private static void changeTaskStatus() {
if (tasks.isEmpty()) {
System.out.println("タスクはありません。");
return;
}
System.out.println("状態を変更するタスクを選択してください:");
displayTasks();
System.out.print("状態を変更するタスクの番号を入力してください: ");
int index = scanner.nextInt();
scanner.nextLine(); // 改行を読み飛ばす
if (index < 1 || index > tasks.size()) {
System.out.println("無効な番号です。");
} else {
Task task = tasks.get(index - 1);
System.out.print("新しい状態を入力してください (未完了/進行中/完了): ");
String newStatus = scanner.nextLine();
task.setStatus(newStatus);
System.out.println(task.getName() + " の状態を " + newStatus + " に変更しました。");
}
}
}
class Task {
private String name;
private String deadline;
private String priority;
private String status = "未完了"; // デフォルトの状態は未完了
public Task(String name, String deadline, String priority) {
this.name = name;
this.deadline = deadline;
this.priority = priority;
}
public String getName() {
return name;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
@Override
public String toString() {
return "タスク名: " + name + ", 期限: " + deadline + ", 優先度: " + priority + ", 状態: " + status;
}
}
Better than the average post on this subject by some distance, and a look at elitebuyarena reinforced that, you can tell within the first paragraph that the writer here actually cares about the topic rather than just covering it for the sake of having something to publish that week or that day.
Really like that the writer trusts the reader to follow simple logic without restating every previous point, and a stop at silverpetalstore kept that respect going, treating an audience as capable adults rather than as people who need constant hand holding makes a noticeable difference in the reading experience for me.
Closed it feeling slightly more competent in the topic than I started, and a stop at trendydealhub reinforced that competence boost, real learning is rare in casual online reading but it does happen sometimes and this site managed to make it happen for me today which is genuinely worth pausing to acknowledge.
A clean read with no irritations, and a look at brightcartfusion continued that frictionless quality, the absence of small irritations is something I notice only when present elsewhere and this site is one of the rare places where everything just works and lets me focus on the substance rather than fighting the format.
Spent a few minutes here and came away with a clearer picture of the topic, the writing keeps things simple without dumbing them down, and after a stop at goldensproutgoods the rest of the points lined up neatly which is something I appreciate when I am short on time and need answers fast.
Thank you for the genuine effort here, it shows in every paragraph and not just the headline, and after my visit to rapidgoodszone I was sure this site cares about getting things right rather than chasing clicks, which is the main reason I will come back later this week to read more.
Genuine pleasure to read, and that is not something I say often after a casual click through, and a quick visit to velvetharborgoods kept the same feeling going across the rest of the site, finding writing that actually feels good to spend time with rather than just functional is increasingly rare on the open web.
Once I had read three posts the editorial pattern was clear, and a look at swifttrendhub confirmed the pattern from a fourth angle, sites where the underlying approach reveals itself through accumulated reading rather than being announced are sites with real depth and this one has that quality clearly visible across multiple pieces consistently.
Started reading skeptically because the headline seemed overconfident, and the post earned the headline by the end, and a look at trustedbuyerszone continued that pattern of earning its claims, sites that can back up their headlines without overpromising are rare and this one has clearly developed editorial calibration on that front consistently.
Reading this brought back the satisfaction I used to get from blogs ten years ago, and a stop at silverhorizonstore kept that nostalgic quality alive, sites that capture what was good about an earlier era of internet writing are increasingly precious and this one is doing that without feeling like a deliberate throwback at all.
Came across this and immediately thought of a friend who would enjoy it, and a stop at freshcartcorner also reminded me of someone, content that triggers the urge to share is content that has earned my recommendation and this site has earned multiple from me already across different conversations during the week.
Really appreciate the confidence to make a clear point rather than hedging everything, and a quick visit to premiumpickzone maintained the same direct stance, writing that takes positions rather than equivocating is more useful even when the positions are debatable because at least the reader has something to react to clearly.
Worth recognising that this site does not chase the daily news cycle, and a stop at dreamwovenbazaar confirmed the longer publication arc, sites that resist the pressure to comment on every passing event are sites with genuine editorial discipline and this one has clearly chosen depth over volume which I respect deeply.
Refreshing to find writing that does not try to manipulate the reader into clicking onto the next page through cliffhangers and forced engagement, and a stop at epiccartcenter continued in the same respectful way, this is what reader first design actually looks like in practice rather than just in marketing copy that sounds nice.
Now considering the post as evidence that careful blog writing is still possible, and a look at copperwindessentials extended that evidence, the broader question of whether the modern web can sustain quality writing has obvious empirical answers in sites like this one and seeing them is reassuring even when they remain a minority overall today.
Skipped the related products section because there was none, and a stop at silversproutstore also lacked any aggressive monetisation, content that is not constantly trying to convert me into a customer or subscriber is content that has confidence in its own value and that confidence shows up as a different reading experience.
Reading this confirmed that the topic deserves more careful attention than it usually gets, and a stop at infinitybuyhub extended that elevated framing, content that raises the appropriate weight of a subject without being preachy about it is serving a quiet but important editorial function for the broader cultural conversation about it.