1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Helen [10]
2 years ago
11

Write an algorithm for switching off the electric water heater automatically when the temperature rises to 70 o Celsius.

Computers and Technology
1 answer:
noname [10]2 years ago
3 0

Answer:

The algorithm for switching off the electric water heater automatically when the temperature rises to 70 o Celsius is given below.

Explanation:

Let use python code for this question.

we will use if statement to check the condition if the temperature is greater than 70.

When the temperature is 70, then the algorithm will send signal to hardware to turn yourself off.

if(temperature==70):

      print("send_turn_off_signal")

You might be interested in
5. In what ways is the human brain like a computer? In what ways is it different?
yan [13]

Answer:

Similar to a computer, the human brain is like a storage unit of information and operator for the human body. Though the brain can hold more info than a computer, both are used to complete various tasks.

Explanation:

5 0
2 years ago
Read 2 more answers
90 POINTS Hazel is working with a database to help determine if the company she works for is making or losing money. Hazel has o
VikaD [51]

Answer:

a

Explanation:

5 0
2 years ago
Read 2 more answers
Which of the following are points that can demonstrate the accuracy of a website?
Ivahew [28]

websites that can backup their answers so the first one:) im just thinking logically.

3 0
3 years ago
When a user receives an email warning about the dire consequences of possible virus attacks on their pc or tablet, it is often a
Sliva [168]
Sometime it's a scam an sometimes it's true
7 0
3 years ago
Create a class called Hokeemon that can be used as a template to create magical creatures called Hokeeemons. Hokeemons can be of
Viefleur [7K]

Answer:

See Explaination

Explanation:

/*****************************************Hokeemon.java********************************/

import java.io.File;

import java.io.FileNotFoundException;

import java.util.Scanner;

public class Hokeemon {

private String name;

private String type;

private int age;

public Hokeemon(String name, String type, int age) {

super();

this.name = name;

this.type = type;

this.age = age;

}

public Hokeemon() {

this.name = "";

this.type = "";

this.age = 0;

}

public String getName() {

return name;

}

public void setName(String name) {

this.name = name;

}

public String getType() {

return type;

}

public void setType(String type) {

this.type = type;

}

public int getAge() {

return age;

}

public void setAge(int age) {

this.age = age;

}

public String liveIn() {

if (this.type.equalsIgnoreCase("dwarf")) {

return "Mountain";

} else if (this.type.equalsIgnoreCase("elf")) {

return "Dale";

} else if (this.type.equalsIgnoreCase("fairy")) {

return "Forest";

} else {

return "Shire";

}

}

public boolean areFriends(Hokeemon other) {

if (this.type.equalsIgnoreCase(other.type)) {

return true;

} else if ((this.type.equalsIgnoreCase("dwarf") && other.type.equalsIgnoreCase("elf"))

|| (this.type.equalsIgnoreCase("elf") && other.type.equalsIgnoreCase("dwarf"))) {

return true;

} else if ((this.type.equalsIgnoreCase("hobbit") && other.type.equalsIgnoreCase("fairy"))

|| (this.type.equalsIgnoreCase("fairy") && other.type.equalsIgnoreCase("hobbit"))) {

return true;

} else {

return false;

}

}

public static Hokeemon[] getData(String file) {

Hokeemon[] hokeemons = new Hokeemon[8];

int i = 0;

try {

Scanner scan = new Scanner(new File(file));

while (scan.hasNextLine() && i < hokeemons.length) {

String line = scan.nextLine();

String[] data = line.split("\\s+");

String name = data[0];

String type = data[1];

int age = Integer.parseInt(data[2]);

hokeemons[i] = new Hokeemon(name, type, age);

i++;

}

scan.close();

} catch (FileNotFoundException e) {

System.err.println(e);

}

return hokeemons;

}

public static String getBio(Hokeemon[] hokeemons) {

String s = "";

for (Hokeemon hokeemon : hokeemons) {

s += "I am " + hokeemon.getName() + ": Type " + hokeemon.getType() + ": Age=" + hokeemon.getAge()

+ ", I live in " + hokeemon.liveIn() + "\n";

s += "My friends are: ";

for (Hokeemon hokeemon2 : hokeemons) {

if (hokeemon.areFriends(hokeemon2) && !hokeemon.equals(hokeemon2)) {

s += (hokeemon2.getName() + " ");

}

}

s += "\n";

}

return s;

}

atOverride

public String toString() {

return "Name " + name + ": Type " + type + ": Age=" + age + "\n";

}

}

/*******************************HokeemonMain.java**************************/

import java.util.Arrays;

public class HokeemonMain {

public static void main(String[] args) {

Hokeemon[] hokeemons = Hokeemon.getData("data.txt");

System.out.println(Arrays.toString(hokeemons));

System.out.println(Hokeemon.getBio(hokeemons));

}

}

/**********************************data.txt********************/

Noddy Dwarf 4

Legolas Elf 77

Minerva Fairy 33

Samwise Hobbit 24

Merry Hobbit 29

Warhammer Dwarf 87

Ernedyll Elf 19

Frodo Hobbit 18

3 0
3 years ago
Other questions:
  • Which software application should be used to create a sales pitch to a group of people? Database Email Presentation Word process
    9·1 answer
  • What does the picture indicate on the famous book “Dawn of the century”?​
    10·1 answer
  • What financial behaviors will typically lead to a low credit score?
    14·1 answer
  • The smallest building block of a wireless lan is a ______.
    5·1 answer
  • Issues with paper based records include a. time spent re-keying data, searching for paper copies, and filing. b. storage volume
    9·1 answer
  • Candice’s first job was at the grocery store making deli food. While in culinary school, she worked part time in a restaurant ki
    12·2 answers
  • Each of the outcomes listed below is a result of executing the following script except for one. Which one? CREATE ROLE ExampleRo
    6·1 answer
  • How to chnage email adresss on slate from tophat?
    13·1 answer
  • Jeremy has created a document that has images and a chart. The chart has to be updated manually, and double-clicking on the char
    15·1 answer
  • 4. What are the ethical issues of using password cracker and recovery tools? Are there any limitations, policies, or regulations
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!