Intro to Programming Languages

LecLabs 3.1/2 - C++ Intro

[ ← Module List ]

This module covers an introductuction to C++. Explaining some of the difference between C and C++ syntax.

6 challenges

Challenges

CHALLENGE 01

Lecture 3.1.1. OO Paradigm

— solves

Lecture video on OO Paradigm

CHALLENGE 02

Lecture 3.1.2.1. Differences

— solves

Lecture video on Differences

CHALLENGE 03

Lecture 3.1.2.2. Buffer and Files

— solves

Lecture video on Buffer and Files

CHALLENGE 04

Lab 3.1.2.2 - Creating Objects from JSON

— solves

Objective

Create a program that uses the json11 library to parse a JSON string and access the data in a json11 object.

CTRL-Click Here for Follow Along Video

Requirements

  • Implement the requirements described in the CODE: comments
  • Compile the code using make
  • Test the code
  • Run tester
CHALLENGE 05

Lecture 3.1.3. Classes

— solves

Lecture video on Classes

CHALLENGE 06

EzLab 3.1.3.0 Classes & Objects

— solves

This lab exercise will help you understand how to create and delete objects in C++ using dynamic memory allocation. You will implement a simple class, create an object using new, and delete it using delete. Instructions:

  1. Implement a simple class named SimpleObject.
  2. Define a constructor and a destructor for SimpleObject.
  3. In the main function, dynamically create an instance of SimpleObject using new.
  4. Delete the created instance using delete.