class from descriptionWed, 17 May 2023

Realice un programa que controle una cabina de acondicionamiento de plantas, las cuales requieren un proceso de acondicionamiento de temperatura, de baja temperatura, normalmente a 18°C a temperatura ambiente 25°C, este proceso debe llevar a cabo en un tiempo estimado de 4 horas, la rampa de acondicionamiento de ambiente debe tomar temperatura y humedad ambiente (lugar final) y la temperatura y humedad inicial (laboratorio) se debe introducir por medio un teclado o interfaz de pantalla (celular). En el proceso el sistema debe lograr igual la temperatura y humedad final del sistema.

#include <iostream> using namespace std; class Plant{ private: float currentTemp; float currentHumidity; float targetTemp; float targetHumidity; public: Plant(float tt, float th){ targetTemp = tt; targetHumidity = th; } void condition(float cTemp, float cHumidity, float seconds){ currentTemp = cTemp; currentHumidity = cHumidity; while (currentTemp != targetTemp){ if (currentTemp > targetTemp) currentTemp -= 1; else currentTemp += 1; cout << "Current temperature: " << currentTemp << endl; } while (currentHumidity != targetHumidity){ if (currentHumidity > targetHumidity) currentHumidity -= 1; else currentHumidity += 1; cout << "Current humidity: " << currentHumidity << endl; } cout << "Current temperature: " << currentTemp << end

Questions about programming?Chat with your personal AI assistant