This is a C++ library for teaching basic concepts in CSF111 Computer Programming. It's currently mostly a wrapper around the Standard Library so there's lots of room for improvement. We've also developed a VSCode extension to provide functionality like: fetch, switch assignment, change git user, submit, delete, auto commit and active time logging on save
Here's 3 broad areas we could work on to improve the plugin
- Improving the library: Adding features, like adding capabilites to make a simple GUI, or detailed logs for better debugging or just refactoring the code
- Improving the plugin: We faced a lot of issues with docker and git. We could redesign the toolchain to be easier to use, maybe replace docker with a simpler alternative. This option is pretty open ended and any input is welcome
- Analysis on the data: Around 90 students signed the consent form to let us use their data. We could anonymize the data and publish a paper like this one: Research Paper
Experience with basics of C++. We can teach you about libraries and linking but we can't teach C++ from scratch. It's a big plus if you were one of the students who used this library and have ideas on how to improve it.
Everything is under namespace cp
. No nested namespaces.
- io.hxx
void print(int)
andvoid println(int)
, similarly for double, bool, char, cp::stringvoid println()
int read_int()
, similarly for double, bool, char, cp::string
- fileio.hxx: two classes
input_file
andoutput_file
- methods common to both
- ctor with a
cp::string
param: name of the file bool eof()
bool is_open()
void close()
cp::string name()
- ctor with a
- methods for input_file
int read_int()
, similarly for double, bool, char, cp::string
- methods for output_file
void print(int)
andvoid println(int)
, similarly for double, bool, char, cp::stringvoid println()
- methods common to both
- math.hxx
double sqrt(double)
double ceiling(double)
double floor(double)
int abs(int)
, also fordouble
inline constexpr double e
inline constexpr double pi
- logical.hxx
bool and(bool, bool)
bool or(bool, bool)
bool not(bool)
- string.hxx
- ctor, dtor, operator=
operator[]
operator==
,operator<=>
operator+
operator>>
,operator<<
size_type length()
to_string(int)
similarly for double, bool, charint to_int()
similarly for double, bool, char- iterators
begin
andend
int index_of(char)
void clear()
inline constexpr cp::string newline
- list.hxx -
list<T>
that internally usesvector<T>
and provides following methods- ctor, dtor, operator=
- iterators
begin
,end
size_type size()
void clear()
void insert_at(size_type pos, int value)
int remove_from(size_type pos)
operator==
,operator<=>
cp::string to_string()
- To hide templates, use
typedef list_int list<int>
, similarly for double, bool, char, cp::string - To hide templates, use
typedef list_int list<int>
, similarly for double, bool, char, cp::string
- assert.hxx
void assert(bool)
,void assert(bool, cp::string)