Skip to content

Object-Oriented-Programming-aka-Uniwa/Intro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

UNIWA

UNIVERSITY OF WEST ATTICA
SCHOOL OF ENGINEERING
DEPARTMENT OF COMPUTER ENGINEERING AND INFORMATICS


Object-Oriented Programming

From C to C++

Vasileios Evangelos Athanasiou
Student ID: 19390005

GitHub · LinkedIn


Supervision

Supervisor: Cleo Sgouropoulou, Professor

UNIWA Profile · LinkedIn

Co-supervisor: Georgios Meletiou, Laboratory Teaching Staff

UNIWA Profile


Athens, June 2022



README

This repository contains a C++ program that demonstrates the use of structures, dynamic memory allocation, and pointers to manage information about Avengers characters. Users can read, process, and display various statistics, calculate averages, and identify the strongest Avenger based on different criteria.


Table of Contents

Section Folder/File Description
1 assign/ Assignment material for the Intro workshop
1.1 assign/Exercise1.png Exercise description in English
1.2 assign/Άσκηση1.png Exercise description in Greek
2 src/ Source code files for introductory exercises
2.1 src/Intro.cpp C++ source code for the introductory exercise
3 README.md Project documentation
4 INSTALL.md Usage instructions

Project Overview

The program allows:

  • Reading and storing Avengers’ attributes
  • Calculating maximum and average statistics
  • Printing character details
  • Identifying the strongest Avenger
  • Working with a 2D matrix of integers for additional functionality

Key Features

1. Dynamic Memory Allocation

  • Allocates memory for an array of Avengers structures dynamically to efficiently store user-defined numbers of characters.

2. Struct Usage

  • Defines properties of Avengers including: name, intelligence, leadership, outfit, powers, and damage.

3. Program Functionality

  • Read and store Avengers’ attributes
  • Compute maximum and average statistics
  • Print details of Avengers
  • Identify the strongest Avenger
  • Work with a 2D matrix of random integers

4. Memory Management

  • Functions to check and free dynamically allocated memory, ensuring no memory leaks.

Key Functions

Function Description
Change_Const() Demonstrates pointer manipulation with constants
Read_Avengers() Reads data into an array of Avengers
Max_Stats(const Avengers *, string &, const int) Returns maximum statistics and corresponding Avenger
Avg_Stats(const Avengers *, const int) Computes average statistics
Print_Avg_Stats(...) Prints average statistics for given inputs
Search_Lowest_Even(...) Finds the lowest even number in a 2D matrix
Append_Characters(...) Demonstrates default parameter usage by appending characters

Example Use Cases:

  • Managing and analyzing superhero statistics
  • Performing operations based on user-defined input for character attributes

About

C++ program demonstrating structures, dynamic memory allocation, and pointers to manage and analyze Avengers character data, with statistics and matrix operations (Object Oriented Programming, UNIWA).

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages