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
murzikaleks [220]
3 years ago
6

EX 7.15 Imagine a game in which some game elements can be broken by the player and others can’t. Create an interface called Brea

kable that has a method called break that takes no parameters and another called broken that returns a boolean result indicating whether that object is currently broken.
Computers and Technology
1 answer:
skelet666 [1.2K]3 years ago
4 0

Answer:

public interface Breakable

{

  public void break();  

public boolean broken();

}

Explanation:

Here is the interface named Breakable

This interface has two functions break() and broken()

break() method has no parameters

broken() method returns a boolean result. As you can see boolean keyword is written before the method name  which basically return true or false.

You might be interested in
The internet and the world wide web are the same thing <br> a. True <br> b. False
wariber [46]
Well its really both in a way but the answer is A) True 
4 0
4 years ago
Write method reverseString, which takes a string str and returns a new string with the characters in str in reverse order. For e
son4ous [18]

Answer:

The method written in Java is as follows:

public static String reverseString(String str){

    String result = "";

    int lentt = str.length();

    char[] strArray = str.toCharArray();

       for (int i = lentt - 1; i >= 0; i--)

           result+=strArray[i];

    return result;

}

Explanation:

This defines the method

public static String reverseString(String str){

This initializes the result of the reversed string to an empty string

    String result = "";

This calculates the length of the string

    int lentt = str.length();

This converts the string to a char array

    char[] strArray = str.toCharArray();

This iterates through the char array

       for (int i = lentt - 1; i >= 0; i--)

This gets the reversed string

           result+=strArray[i];

This returns the reversed string            

    return result;

}

<em>See attachment for full program that includes the main method</em>

Download txt
3 0
3 years ago
Finish the program to compute how many gallons of paint are needed to cover the given square feet of walls. Assume 1 gallon can
Zepler [3.9K]

Answer:

The program in Python is:

Area = float(input("Area: "))

print("Gallons: "+str(Area/350.0))

Explanation:

The requirement of the program is straightforward and what is required is to divide the inputted area by 350.

Hence, the explanation is as follows:

This line prompts user for Area

Area = float(input("Area: "))

This line calculates and prints the equivalent number of gallons

print("Gallons: "+str(Area/350.0))

4 0
3 years ago
Technician A says aluminum cylinder head surfaces should be scraped clean only with nonmetallic tools to avoid gouging. Technici
fredd [130]
<span><span><span /></span></span>Both Technicians (A and B) are correct since the aluminum cylinder head surfaces should be scraped clean only with nonmetallic tools to avoid gouging and it should also be chemically cleaned in accordance with the manufacturer's recommendations before the inspection.<span><span /></span>
6 0
3 years ago
Read 2 more answers
Choose the correct vocabulary term from each drop-down menu
Korvikt [17]

Answer:

The answer to this question is given below in the explanation section.

Explanation:

Education that focuses on skills that can be used in the workplace is work-based learning.

Creating curriculum around learning goals established by the training or learning department is formal learning.

The continued pursuit of knowledge for either personal or professional reasons is lifelong learning.

Learning that focuses on goals established by the learner is informal learning.

7 0
3 years ago
Other questions:
  • To type the letter address, _________ space from the dateline
    9·2 answers
  • What is the purpose of a scatter plot introduction to computer applications
    6·2 answers
  • ____ devices are high-performance storage systems that are connected individually to a network to provide storage for the comput
    5·1 answer
  • Write a program to test the various operations of the class clockType
    8·1 answer
  • Given the integer variables x, y, and z, write a fragment of code that assigns the smallest of x, y, and z to another integer va
    7·1 answer
  • Which of the following is a Layer 3 protocol designed to permit routers to exchange information about networks that are reachabl
    10·2 answers
  • Marie has never used a word processor. In 3 to 4 sentences, describe how she could benefit from using a word processor to comple
    7·2 answers
  • In what ways do you think the media should function in a democratic society?
    9·1 answer
  • Which programming languages is best for game development? ​
    10·1 answer
  • You find a picture of a famous department store online that would be great to include in a project of yours. What should you do
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!