Skip to content

Commit e255d83

Browse files
committed
Completing the Journal program
1 parent add3707 commit e255d83

File tree

8 files changed

+44
-15
lines changed

8 files changed

+44
-15
lines changed

prepare/Learning02/Program.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ static void Main(string[] args)
2727

2828
myResume._jobs.Add(job1);
2929
myResume._jobs.Add(job2);
30+
myResume._jobs.Add(job3);
3031

3132
myResume.Display();
3233
}

prove/Develop02/Diagram.cs

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/*
2-
Program Diagram
2+
Program Diagram
3+
34
+-----------------+
45
| Program |
56
+-----------------+
@@ -17,15 +18,15 @@ Program Diagram
1718
| | | -response: str |
1819
| +get_prompt(): str | | -date: str |
1920
+-----------------------+ +----------------+
20-
|
21+
|
2122
|
2223
+-------------+-------------------+
2324
| | |
24-
+---------+-----+ +-----+---------+ +------------+
25-
| SaveToFile | | LoadFromFile | | Display |
26-
+----------------+ +----------------+ +-------------------------+
27-
| -filename: str | | -filename: str | | -journal: list of Entry |
28-
| | | | | |
29-
| +save(): None | | +load(): None | | +display(): None |
30-
+----------------+ +----------------+ +-------------------------+
25+
+---------+-----+ +-----+---------+ +------------+
26+
| SaveToFile | | LoadFromFile | | Display |
27+
+----------------+ +----------------+ +-------------------------+
28+
| -filename: str | | -filename: str | | -journal: list of Entry |
29+
| | | | | |
30+
| +save(): None | | +load(): None | | +display(): None |
31+
+----------------+ +----------------+ +-------------------------+
3132
*/

prove/Develop02/Entry.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ namespace DailyJournal
44
{
55
class Entry
66
{
7-
private string _prompt;
8-
private string _response;
9-
private string _date;
7+
public string _prompt;
8+
public string _response;
9+
public string _date;
1010

1111
public Entry(string prompt, string response, string date)
1212
{

prove/Develop02/Journal.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ namespace DailyJournal
44
{
55
class Journal
66
{
7-
private List<Entry> entries;
7+
8+
public List<Entry> entries;
89

910
public Journal()
1011
{

prove/Develop02/Program.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ static void Main(string[] args)
88
{
99
Journal journal = new Journal();
1010

11-
// List of prompts
1211
List<string> prompts = new List<string>
1312
{
1413
"Did anything unexpected happen today that surprised you? ",
@@ -40,7 +39,7 @@ static void Main(string[] args)
4039
Console.WriteLine("4. Load");
4140
Console.WriteLine("5. Quit");
4241

43-
Console.Write("\nWhat would you like to do? ");
42+
Console.WriteLine("\nWhat would you like to do? ");
4443
string choice = Console.ReadLine();
4544

4645
switch (choice)

prove/Develop02/mydate

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
05/12/2023,What would you like to do more of in your daily life and how do you plan to achieve it? ,no no no
2+
05/12/2023,What was the most meaningful spiritual experience you had today? ,nananan hahaha
3+
05/12/2023,Did anything unexpected happen today that surprised you? ,I meet a person I did not se in a while

prove/Develop02/mynamemyname

Whitespace-only changes.

rought.cs

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
using System;
2+
3+
class MyJournal
4+
{
5+
static void Main(String[] args)
6+
{
7+
MyJournal journal1 = new MyJournal();
8+
9+
List<string> prompts = new List<string>
10+
{
11+
"Hello hello";
12+
"My name is Gabriel";
13+
}
14+
};
15+
16+
bool quit = false
17+
while (!quit)
18+
{
19+
Console.WriteLine("\nWelcome to the Journal Program");
20+
Console.WriteLine("Choose one");
21+
}
22+
23+
24+
}

0 commit comments

Comments
 (0)