Answer: 1)System Palette
Explanation: System palette is kind of palette found in the system which contain the color values that is used by the display.This palette is also drawing of the devices and applications.But the application don't get the direct access to the system palette rather logical palette permits it.
They work on the basis of the properties carried from the Back color and Fore color.Other palettes mention in the option is incorrect because these palettes don't work for the operating system's display .Thus the correct option is option(1).
Answer:
See explaination
Explanation:
#include <iostream>
using namespace std;
class Circle{
// private member variable named radius
private:
double radius;
// get function for radius
public:
double getRadius(){
return radius;
}
// set function for radius
void setRadius(double rad){
radius=rad;
}
// returning area = 3.14159 * radius * radius
double getArea(){
return (3.14159 * radius * radius);
}
};
// Sample run
int main()
{
// Declaring object of Circle
Circle myCircle;
myCircle.setRadius(5);
// printing radius of circle
cout<<"Radius of circle is: "<<(myCircle.getRadius())<<endl;
// printing area of circle
cout<<"Area of circle is: "<<(myCircle.getArea())<<endl;
return 0;
}
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.
He should've paid more attention to his friends teasing him. It was an honest mistake and easy to do, we're all human.