I need help with a C Program Here are the instructions Imple

I need help with a C++ Program. Here are the instructions:

Implement the described program using OOD/OOP and separated compilation:

Satellite Controller System, having the following features …

1. Define a data structure that has following variables: countries {USA, China, Germany, Japan, Switzerland}, Package {Tera-byte types: 1, 2, 3, 4}, price per package transmission according to package type {1:$210, 2:$350, 3:$400, 4:$500}, timeTrasmission {time needed to send the package type according to the respective package – 1: 1 hour; 2: 3 hours; 3: 5 hours, 4: 10 hours}, requestedTransmission {Off or On: 0 or 1}.

2. The satellite can attend only 2 countries at the same time each time – so it has only two transmission channels.

3. Define stochastically/randomly if a country has requested to send transmission.

4. If countries have requestedTransmission, then apply uniform random values for: waiting list that will comprise the countries in queue waiting to be next to transmit data, comprising the list that contains the countries using their number according to their position in the vector that contains 5 countries; Note: as the generated values sequence is random, apply the rule that a country can not request twice.

5. Consider that the satellite will attend each activated country and service all countries in the waiting list, and then the satellite will have rest for maintenance. Give the total of hours that was required to attend the countries that have requested data transmission and how much the satellite company earned from the countries according to their data transmission.

Solution

Answer : The program for the given problem can be written as shown below.

#include <iostream>
#include <string>
#include <sstream>
using namespace std;

struct countries
{
string package;
double price;
int time;
}

int main()
{
string mystr;
{
cout << \"enter the country:\";
getline (cin.country);
cout << \"enter the package(tera byte types):\";
getline ( cin.package);
cout << \"enter the price:\";
getline (cin.price);
cout << \"enter the time trasmission:\";
getline (cin.time trasmission);

cout << \" requested trasmission is:\ \";
cout << \" off or on:\ \";
cout << \" then it is :\ \";
return 0;
}
}

OUTPUT:
enter the country:USA
enter the package(tera byte types):1
enter the price:$210
enter the time trasmission:1 hour

requested trasmission is:
off
then it is:

0

requested trasmission is:

on

then it is :

1

I need help with a C++ Program. Here are the instructions: Implement the described program using OOD/OOP and separated compilation: Satellite Controller System,
I need help with a C++ Program. Here are the instructions: Implement the described program using OOD/OOP and separated compilation: Satellite Controller System,

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site