Answer:
Z-Wave
Explanation:
1. Wi-fi because it is always encrypted. This is good because Bandwidth is high—up to 2 MHz, however it only works if the signal is strong and device is close to the access point. Its average range is between 30 to 100 meters. This drawback only makes this technology not a good option.
2. ZigBee because it is always encrypted, ZigBee has lot of edge like largest number of device to connect 6500 theoretically, low power usage, faster and others compared to other which would have made it a better option to recommend to my company but it has interoperability issues
3. Z-Wave because it is the fastest wireless standard apart from this Z-wave has better interoperability, reliability, low frequent which does not interfere with Wi-Fi network, maintain backwards compatibility across all versions which is good for maintenance, Z Wave network to have greater ranges and ability to “bend” around obstacles.
4. Bluetooth because it is easiest to configure Low Energy (LE) is better at conserving power, it has a much longer range compared to others —up to 300 feet, under ideal circumstances—its low transmission rate will keep it from being used for data-heavy applications such as video.
In view of security and distance and compared with other IoT protocol i would recommended Z-Wave
Answer:
Following are the program to this question:
#include <iostream> //defining header file
using namespace std;
int hailstoneLength(int n) //defining method hailstoneLength
{
int t=1; //defining integer variable assign
while(n!=1) //define a loop that checks value is not equal to 1
{
if(n%2==0) // check even number condition
{
n=n/2; // divide the value by 2 and store its remainder value in n
t++; //increment value of t by 1.
}
else
{
n=n*3+1; //calculate and hold value in n
t++; //increment value of t variable by 1
}
}
return t; //return value
}
int main() //defining main method
{
int n; //defining integer variable
cout<<"Enter any number: "; //print message
cin>> n; //input value
cout<<hailstoneLength(n); //call method and print its value
return 0;
}
Output:
Enter any number: 3
8
Explanation:
Program description can be given as follows:
- In the given C++ language program an integer method "hailstoneLength", is declared, that accepts an integer variable "n" in its parameter.
- Inside the method, an integer variable t is declared, that assign a value that is 1, in the next line, a while loop is declared, that uses if block to check even condition if number is even it divide by 2 and increment t variable value by 1.
- If the number is odd it will multiply the value by 3 and add 1 and increment t by 1 then it will go to if block to check value again. when value of n is not equal to 1 it will return t variable value.
- In the main method, an integer variable "n" is used that call the method and print its return value.
Answer:
void doublelt(int *number)
{
*number=*number*2;
}
Explanation:
This exercise is for you to learn and understand the PASS BY POINTER syntax. The importance of this is that if you didnt use a pointer you would have to RETURN an int from the function. in that case the code would be:
int doublelt(int number)
{
number=number*2;
return number;
}
Passing by pointer manipulates the value by going inside the memory and where it resides. Without the pointer, the function would create COPIES of the argument you pass and delete them once the function ends. And you would have to use the RETURNED value only.
Answer:
Studying in groups can have many effective outcomes and be beneficial. Here are some ways studying in a group is benefical,
1. More support, limits chances of procrastination
<u> With many people, everyone is assigned a role or there is more determination by all peoples to get the work done than an individual being the only one responsible than many trying to accomplish the completion of the project. </u>
2. More people means more parts can get done effectively and taking notes is easier.
<u> More people allow the work (depending on the project of assignment) for the work to get more focused and worked on faster with the designated roles given. </u>
3. More interactive and allows (sometimes an enjoyable times) and to even learn faster than independently.
People, not all however, might like the company, there's support and even people skills is enhanced by being in the group.
Answer:
(3) option is the correct answer.
Explanation:
Constructors need to initialize the object in the memory. "To declare the Constructor for any class the user needs to specify the constructor name which is already the class name". This is an object-oriented language guideline.
It is because the object is created by the name of the class and Constructor is used to allocate the memory for the object. hence Constructor is created by the name of the class.
For example--
class test //class name test
{
test() //created a constructor with class name "test"
{
}
}
In the above example class name and constructor name are same if it not then it will gives a error.
Another option is not valid for the answer to the above problem because-
- Option 1 is wrong because, for any class, the data member is a type of variable, which is used to store the data and is accessed with the help of an object.
- Option 2 is wrong because, for any class, member function is a type of user function used to accessed the variable and expressions.
- Option 4 is wrong because, package is a set used to hold classes and interfaces.