The following cose will be used to copy assignment operator for CarCounter
<u>Explanation:</u>
Complete Program:
#include <iostream>
using namespace std;
class CarCounter
{
public:
CarCounter();
CarCounter& operator=(const CarCounter& objToCopy);
void SetCarCount(const int setVal)
{
carCount = setVal;
}
int GetCarCount() const
{
return carCount;
}
private:
int carCount;
};
CarCounter::CarCounter()
{
carCount = 0;
return;
}
// FIXME write copy assignment operator
/* Your solution goes here */
CarCounter& CarCounter::operator=(const CarCounter& objToCopy)
{
if(this != &objToCopy)
carCount = objToCopy.carCount;
return *this;
}
int main()
{
CarCounter frontParkingLot;
CarCounter backParkingLot;
frontParkingLot.SetCarCount(12);
backParkingLot = frontParkingLot;
cout << "Cars counted: " << backParkingLot.GetCarCount();
cout << endl << endl;
system("pause");
return 0;
}
The department store should consider using RFIDs (Radio Frequency Identification) for tracking inventory. Unlike the wireless barcodes, RFID uses radio waves to communicate with readers. One very common advantage of an RFID is the scanning range. Wireless barcodes, for instance, requires the reader to be close to the barcode before it can see it to scan it. However, RFID systems can scan a tag as long as it is within range. This is important because it reduces wastage of time on labor-intensive processes and increases task speed, convenience, and project turnover.
Many passive RFIDs use tags that are powered by electromagnetic energy. Such energy does not consume power.
Answer:
mobility and broad reach
Explanation:
The two major characteristics of mobile computing are:
Mobility: It basically refers to the portability. Mobility means that users can carry their mobile device wherever they go. This facilitates real-time communication with other devices. Users can take a mobile device anywhere and can contact with other devices and systems via a wireless network for example a user, wherever he happens to be, can log in to his email account to check his emails using his mobile phone.
Broad Reach: It basically means that the mobile device users can be reached at any time. This means that the users of an open mobile device can be instantaneously contacted. Having an open mobile device means that it can be reached by or connected to other mobile networks. However mobile users also have options to restrict specific messages or calls.
Answer:
Python Code:
def validate_url(url):
#Creating the list of valid protocols and file name extensions
valid_protocols = ['http', 'https', 'ftp']
valid_fileinfo = ['.html', '.csv', '.docx']
#splitting the url into two parts
url_split = url.split('://')
isProtocolValid = False
isFileValid = False
#iterating over the valid protocols and file names for validity
for x in valid_protocols:
if x in url_split[0]:
isProtocolValid = True
break
for x in valid_fileinfo:
if x in url_split[1]:
isFileValid = True
break
#Returning the result if the URL has both valid protocol and file extension
return (isProtocolValid and isFileValid)
url = input("Enter an URL: ")
print(validate_url(url))
Explanation:
The image of the output code is attached. Hope it helps.
Answer:
#include <iostream>
using namespace std;
int main () {
// for loop execution
int semester_fees=8000;
int b=1;
cout<<"there are 5 years or 10 semester fees breakdown is given below"<<endl;
for( int a = 1; a <=5; a++ ) {
semester_fees = semester_fees*1.03;
cout<<"Semester fees for each of semester"<<b++<<"and"<<b++<<"is:$"<<semester_fees<<endl;
}
return 0;
}
Explanation:
code is in c++ language
Fees is incremented yearly and i have considered only two semester per year