Answer:
#include <iostream>
using namespace std;
class Digits
{
public:
int num;
int read() //method to read num from user
{
cout<<"Enter number(>0)\n";
cin>>num;
return num;
}
int digit_count(int num) //method to count number of digits of num
{
int count=0;
while(num>0) //loop till num>0
{
num/=10;
count++; //counter which counts number of digits
}
return count;
}
int countDigits(int num) //method to return remainder
{
int c=digit_count(num); //calls method inside method
return num%c;
}
};
int main()
{
Digits d; //object of class Digits is created
int number=d.read(); //num is read from user
cout<<"\nRemainder is : "<<d.countDigits(number); //used to find remainder
return 0;
}
Output :
Enter number(>0)
343
Remainder is : 1
Explanation:
As program is missing to find errors , a logically write program is written to find the remainder when a number is divided by its number of digits. A class Digits is constructed which has public variable num and methods read(), digit_count(), countDigits().
- read() - This method reads value of num from the user and return num.
- digit_count() - This method takes a integer as parameter and counts the number of digits of a number passed as argument. while loop is used to increement the counter until num<0. This returns the value of count.
- countDigits() - This method takes a integer as a parameter and returns remainder when the argument is divided by number of digits of argument. Number of digits is calculated by using method digit_count().
At last in main method , object of Digits class is created and its methods are used to find the output.
Answer:
toString is right Answer
Explanation:
If you want to represent any object as a string, toString() method comes into existence.
The toString() method returns the string representation of the object.
If you print any object, java compiler internally invokes the toString() method on the object. So overriding the toString() method, returns the desired output, it can be the state of an object etc. depends on your implementation.
Based on the above, the type of security is illustrated in this example is known as data security.
<h3>What is Data security?</h3>
This is known to be the act of keeping safe data from unauthorized access and its corruption in all of its lifecycle.
Note that in the case above, the intruder is interested in the companies data and as such, the type of security is illustrated in this example is known as data security.
Learn more about security from
brainly.com/question/15668437
#SPJ1
Answer:
It's due to damage of goods
Answer:
The four types of maintenance in IT are given as:
Preventive maintenance: It is the important part to facilitates the management system and it should be designed carefully o prevent them from failure. the main aim of preventive maintenance is to successfully establish the design to improve the system performance.
Corrective maintenance: It basically refers to the changes made to repair the defects in the implementation and designing of the system. It is usually performed after the failure occur in the equipment. It also increased overall productivity of the system.
Perfective maintenance: It basically improve the performance of the system, efficiency and maintainability. This type of maintenance are initiated by the IT department.
Adaptive maintenance: It involves the implementation changes in the system to increase its functionality. It basically improve its efficiency and increase its capability. It is less urgent than corrective maintenance.