Home > Back-end >  Using a c implementation the personal function of the assignment
Using a c implementation the personal function of the assignment

Time:09-30

How to achieve a personal assistant
The experiment content
To implement a simple personal assistant, including adding backlog, list all to-do lists, etc.,
The experimental subject
Implement a Personal Assistant, Personal Assistant application for planning remind individuals work matters,
Contingencies are divided into two categories: events (Event) and tasks (Task), the Event is to point to what will happen about the
Events of choose and employ persons, such as meetings, anniversary, etc.; The task is to user needs to perform, to complete some work, such as open
Task, reading tasks, such as
The experimental requirements
1. Design PA class respectively, Event and Task two classes, by members of the object in the form of combination,
2. The main interface including but not limited to: list all backlog ListTodos (), add a to-do list
AddTodo (), mark items as completed MarkAsDone (), etc., to expand, such as alerts,
3. The experiment aims to practice the use of c + + class, specific details, please play by yourself.

Class declaration, and the use of reference:


//file: pa. H
PersonalAssistant {
Public:

//you can either import data from the file
//or just create a blank instance
//@ the parameter string, the name of the PA owner
PersonalAssistant (const char *);
//add a new todo item
Void AddTodo ();

//the list all todo items on screen
Void ListTodos () const;

//stop particular todo appears on the todo list
//by either delete it or add a mark on the item
//alternatively, you can mark a todo as done by passing its ID
Void MarkAsDone ();

//bonus: add events feature, which date field is essential
//the design your own interface

Private:
//choose your way to store data
};

//file: pa. CPP
//...

//file: main. CPP
Int main () {

PersonalAssistant mypa (" name ");
Mypa. ListTodos ();
Mypa. AddTodo ();
Mypa. MarkAsDone ();
}
  • Related