Skip to content

Algiz25/effective-programming-cpp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

effective-programming-cpp

A collection of C++ projects and assignments completed for the "Effective Programming" course at PWr. The course structure consisted of home assignments and live-coding assessments. For each module, I developed an initial program as homework. During the lab sessions, the instructor tested our comprehension by requiring us to implement real-time modifications and extensions to our pre-written code.

Projects:

  • List 1: Manual memory management, dynamic array allocation, and multiple pointers, practiced by building a custom dynamic array class.

    • Modification: Safe memory reallocation, implemented by adding a method to extract a sub-array and shrink both the original and new arrays to their minimal capacities without data loss.
  • List 2: C++ operator overloading and memory-safe assignments, applied by developing a large-integer class with custom arithmetic operators.

    • Modification: Complex return types and helper classes, utilized to extend the large-integer class with a nested bit-indexing operator.
  • List 3: Abstract Syntax Tree (AST) construction and object-oriented string parsing without a stack, focused on building, evaluating, and joining prefix mathematical expressions.

  • List 4: Template programming and class specialization, practiced by creating a generic Result wrapper to store either a method's successful value or an error description.

    • Modification: Strict error propagation, modifying the Result template to only pass along errors when a return type mismatch occurs.
  • List 5: Automated resource management, reference counting, and move semantics, applied by implementing a custom smart pointer.

    • Modification: Ownership lifecycle safety, resolving a critical bug in the smart pointer implementation caused by assigning the same raw pointer to multiple independent smart pointers.

Mini Project

Algorithmic optimization and object-oriented design, applied by building a custom Genetic Algorithm from scratch with strict manual memory management to solve the Limited Capacitated Vehicle Routing Problem (LcVRP).

  • Modification: Advanced selection mechanisms, implemented by extending the genetic algorithm with a custom, fractional probability-based selection scheme that prioritizes higher-quality individuals.

About

A collection of C++ projects and assignments completed for the "Effective Programming" course at PWr.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors