This repository contains the source code for a progressive energy management system developed as part of university lab tasks. The project simulates energy consumption and costs for households, evolving incrementally across six versions (A1
to A6
).
The system tracks energy usage and costs for households and their devices (consumers and producers). Each version introduces new features or improves existing ones, showcasing progressive software development.
The project builds step by step across six stages:
A1
: Basic implementation of devices and households.A2
: Introduction of specific device types (Mobile
,Immobile
,Solar
).A3
: Dynamic device management using a linked list.A4
: Advanced operations like reordering and copying devices.A5
: File input/output for data persistence.A6
: Final integration of all features in a menu-driven application.
- Add and remove devices dynamically.
- Calculate annual energy consumption and costs.
- Support for multiple device types (
Mobile
,Immobile
,Solar
).
- Track household details such as:
- Square meters.
- Number of residents.
- Water heating (electric or not).
- Manage multiple households within a house.
- Save and load house and household data.
- Use customizable delimiters for file formats.
- Reorder devices within a household.
- Copy devices between households.
- Interactive, menu-driven console application.
Users interact with the application through a menu to perform various tasks:
- Initialize a house: Create a house with multiple households and set its address.
- Manage households: Add, remove, or edit households.
- Add devices: Include
Mobile
,Immobile
, orSolar
devices. - View reports: Print details for individual households or all households.
- Persist data: Save or load the program state to/from a file.
- Reorder or copy devices: Organize and duplicate devices as needed.
This project highlights incremental software development, showcasing how object-oriented programming principles can be applied to solve real-world problems. It serves as a practical learning tool for progressive coding and system design.