-
-
Notifications
You must be signed in to change notification settings - Fork 234
Description
This issue describes how to implement the basics concept exercise for the C++ track.
Getting started
Please please please read the docs before starting. Posting PRs without reading these docs will be a lot more frustrating for you during the review cycle, and exhaust Exercism's maintainers' time. So, before diving into the implementation, please read up on the following documents:
Please also watch the following video:
Goal
The goal of this exercise is to teach the student basic concepts of the C++ language.
Learning objectives
- Know what a variable is.
- Know how to define a variable.
- Know how to update a variable.
- Know how to use type inference for variables.
- Know how to define a method.
- Know how to return a value from a method.
- Know how to call a method.
- Know that methods must be defined in classes.
- Know about the
publicaccess modifier. - Know about the
staticmodifier. - Know how to define an integer.
- Know how to use mathematical operators on integers.
- Know how to define single- and multiline comments.
Out of scope
- Naming rules for identifiers.
- Generic values.
- Memory and performance characteristics.
- Method overloads.
- Lambda's.
- Classes.
- Organizing methods in namespaces.
- Visibility.
Concepts
basics: know what a variable is; know how to define a variable; know how to update a variable; know how to use type inference for variables; know how to define a method; know how to return a value from a method; know how to call a method; know that methods must be defined in classes; know about thepublicaccess modifier; know about thestaticmodifier; know how to defined an integer; know how to use mathematical operators on integers; know how to define single and multiline comments.
Prerequisites
There are no prerequisites.
Resources to refer to
None.
Hints
- How to define an integer.
- How to define a method without any arguments.
- How to return an integer from a function.
- How to add or subtract integers using arithmetic operators.
- How to invoke a function.
After
- More information on the
autokeyword. - More info on the assignment operators.
- More info on
classes. - Introduction of the
statickeyword. - More information on scoping.
- Difference between methods and functions.
- More info on [commenting syntax][comment].
Representer
This exercise does not require any specific representation logic to be added to the representer.
Analyzer
This exercise does not require any specific analyzer logic to be added to the analyzer.
Implementing
To implement this exercise, please follow these instructions.