Answer:
C++.
Explanation:
#include <iostream>
#include <string>
using namespace std;
////////////////////////////////////////////////////////////
class Television {
string brand;
float screen_size;
bool powerOn;
int volume;
int channel;
public:
// Comments
Television(string brand, int screen_size) {
this->brand = brand;
this->screen_size = screen_size;
powerOn = false;
volume = 20;
channel = 2;
}
//////////////////////////////////////////
// Comments
int getVolume() {
return volume;
}
// Comments
int getChannel() {
return channel;
}
// Comments
string getManufacturer() {
return brand;
}
// Comments
float getScreenSize() {
screen_size;
}
///////////////////////////////////////////
// Comments
void setChannel(int channel) {
this->channel = channel;
}
// Comments
void power() {
if (!powerOn)
powerOn = !powerOn;
}
// Comments
void increaseVolume() {
volume = volume + 1;
}
// Comments
void decreseVolume() {
volume = volume - 1;
}
};
Answer:
Attached excel file containing formula for monthly cost of gas.
Explanation:
To find mileage note down readings at the star of month and at end of month.
Subtract end of month reading from start this will give you number of miles in month. Now as per mentioned in question, divide number of miles by average mpg and multiply by the price of a gallon of gas.
Here is your monthly cost of gas.
Answer:
All Rights Reserved, Some Rights Reserved, Public Domain
Explanation:
Answer:
The method of converting a base 10 or decimal number into base 2 or binary number is as following:-
- Divide the decimal number by 2 and store it's remainder.
- keep dividing the decimal number by 2 until it becomes 0 and also keep storing it's remainder.
- Then write the remainders in reverse order.This the binary number.
Refer the attached image for better explanation.