求教三个类的写法
已完成
求
要求从屏幕或者从文档读取时间安排存入ordlist然后由interface作为一个中控
#ifndef LINKEDLIST_H
#define LINKEDLIST_H
#include <iostream>
using std::cout;
using std::cin;
using std::endl;
template < class Type >
class LinkedList
{
public:
LinkedList();
~LinkedList();
void insert(const Type &item, int);
void remove();
Type retrieve() const;
int gotoPrior();
int gotoNext();
int gotoBeginning();
void clear();
int empty() const;
LinkedList(const LinkedList &src);
protected:
class ListElement
{
public:
ListElement(const Type &item, ListElement* nextP):
element(item), next(nextP) {}
Type element;
ListElement* next;
};
ListElement *head;
ListElement *cursor;
};
#endif
#ifndef MEMO_H
#define MEMO_H
class Memo
{
public:
Memo();
const char * getTime();
const char * getTitle();
void setTime(const char *stime);
void setTitle(const char *stitle);
int getKey();
private:
char time[6];
char title[41];
};
#endif
求
#ifndef ORDLIST_H
#define ORDLIST_H
#include "linkedlist.cpp"
template <class Type, class Key>
class OrdList : public LinkedList<Type>//Inheritance
{
public:
OrdList();
~OrdList();
void insert(Type& item);
void merge(const OrdList<Type,Key> other_list);
int search(Key search_key);
};
#endif
#ifndef SCHEDULER_H
#define SCHEDULER_H
#include "Memo.h"
#include "OrdList.cpp"
class Scheduler
{
public:
Scheduler();
void copyConstTest();
void insertMemo(Memo newMemo);
void deleteMemo(char *time);
void readMemos(char filename[]);
void writeMemos(char filename[]);
void displayMemos();
void mergeMemos(char filename[]);
void clearMemos();
private:
OrdList<Memo, int> memos;
};
#endif
#ifndef INTERFACE_H
#define INTERFACE_H
#include "Scheduler.h"
class Interface
{
public:
Interface ();
void getCommand ();
void executeCommand ();
int done ();//返回finished值
private:
Scheduler scheduler;
char command;
int finished;
};
#endif
要求从屏幕或者从文档读取时间安排存入ordlist然后由interface作为一个中控
...全文
相关推荐
求教类似SUMIF;COUNTIF的条件函数的写法???
求教类似SUMIF;COUNTIF的条件函数的写法???
c++类声明和成员函数分离写法
c++将类成员函数实现与类的声明分离的写法,实现了学生类的分离写法
C++类的分离式写法介绍示例
今天小编就为大家分享一篇关于C++类的分离式写法介绍示例,小编觉得内容挺不错的,现在分享给大家,具有很好的参考价值,需要的朋友一起跟随小编来看看吧
TahDoMvc4的类的写法
TahDoMvc4的类的写法TahDoMvc4的类的写法TahDoMvc4的类的写法TahDoMvc4的类的写法TahDoMvc4的类的写法TahDoMvc4的类的写法TahDoMvc4的类的写法TahDoMvc4的类的写法TahDoMvc4的类的写法TahDoMvc4的类的写法TahDoMvc4的类的写法TahDoMvc4的类的写法
详解Vue 单文件组件的三种写法
主要介绍了详解Vue 单文件组件的三种写法,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧


