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
Luda [366]
2 years ago
5

Wap to input any multi digits number and display the sum of odd digits and even digits​

Computers and Technology
1 answer:
Kobotan [32]2 years ago
5 0
Do you have an image?
You might be interested in
Microsoft's ____ is one of the major web-based development environments.
finlep [7]
The answer is ".NET" (had to increase character count to let me post).
4 0
3 years ago
______ is the software that blocks a user from being able to access your computer.
antiseptic1488 [7]
The answer is firewall. It is a network security device that observes inbound and outbound network traffic and chooses whether to allow or block specific traffic based on a well-defined set of security rules. Firewalls have been a first line of protection in network security for over 25 years. The firewall present a barrier between measured and secured internal networks that can be trusted and untrusted outside networks, for example the Internet. A firewall can be software, hardware, or even both.
8 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
Switched backbone networks:_____.a. always use a ring topology.b. require much more management that do routed backbone networks.
Gre4nikov [31]

Answer:

c

Explanation:

spongo  

7 0
3 years ago
This is really not a question but yall should texts me I need friends:))
noname [10]

Answer:

if ur lonely i suggest an app/website called mylol

Explanation:

fdsjafklsuhfkjfudhjkfewuhfdjk fdjs afujijf kldsaflkdjslajrfewiofjdjsahfruifhgijdsk fdsj fds

8 0
2 years ago
Read 2 more answers
Other questions:
  • Use a colon before a list and put one space after a colon. True False
    15·2 answers
  • The negotiation by the transport layer at the sender with the transport layer at the receiver to determine what size packets sho
    14·1 answer
  • What is the purpose of a filename extension? How can you restore a file that you deleted from the hard disk?
    10·1 answer
  • which statement draws an accurate comparison between social media marketing and conventional marketing?
    13·1 answer
  • Assume that you have created a class named DemoCar. Within the Main() method of this class, you instantiate a Car object named m
    12·1 answer
  • A bluetooth network consists of _____ primary device(s) and up to ____ secondary devices.
    8·1 answer
  • You're working in a table that has three columns and five rows. Since the first row will be a header row, you want it to span al
    6·1 answer
  • Difference between private and confidential data?​
    5·1 answer
  • High-level languages must be translated into machine language before they can be executed. _________________________
    10·1 answer
  • Which of the following is not harmful to the computer?<br> a) Trojan<br> b) Rootkit<br> c)Malware
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!