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
notka56 [123]
3 years ago
6

Let’s define a new language called dog-ish. A word is in the lan- guage dog-ish if the word contains the letters ’d’, ’o’, ’g’ a

re in the word in order. For example, "dpoags" would be in dog-ish because dpoags. Other words like "dog", "doooooog", "pdpopgp", and "qwqwedqweqweoqweqw- gasd" would be in dog-ish. "cat", "apple", "do", "g", would not be in dog-ish.(a) Define the method inDogish recursively such that it re- turns true if the word is in dog-ish and false if it is not. I left a dogishHelper method, which I guarantee you will need to recursively solve dogish. An iterative solution will receive no points.(b) Define the method inXish that does the same logic of dog- ish but for some word X. The method returns true if the word contains all the letters in the word X. The solution must be recursive. An iterative solution will receive no points.class Main {
public static void main(String[] args) {
/* leave this main method blank but feel free to uncomment below lines
to test your code */
// System.out.println(dogish("aplderogad"));
// System.out.println(dogishGeneralized("aplderogad", "dog"));
}

// returns true if the word is in dog-ish
// returns false if word is not in dog-ish
public static boolean inDogish(String word){
return false;
}

// necessary to implement inDogish recursively
public static boolean dogishHelper(String word, char letter) {
return false;
}

// a generalized version of the inDogish method
public static boolean inXish(String word, String x){
return false;
}
}
Computers and Technology
1 answer:
Alenkasestr [34]3 years ago
7 0

//docommentifanyproblemarises //code classMain{ publicstaticvoidmain(String[]args){ /* * *leavethismain  would be some of the code. i hope this helps.

You might be interested in
What are the factors affecting the purchasing decision for dbms software?
djverab [1.8K]
T<span>he factors affecting the purchasing decision for dbms software are : 
</span><span>a) Cost
b) DBMS features and tools
c) Underlying model
d) Portability
e) DBMS hardware requirements</span>
3 0
3 years ago
Read 2 more answers
In pre-shared key mode, a passphrase should be at least ________ characters long.
alexandr402 [8]
10.......................................

8 0
3 years ago
How is an amp meter connected in a circuit to measure flow of electrons
Leno4ka [110]
R=0 of the amp meter so it can be placed in the circuit
7 0
3 years ago
Read 2 more answers
Derek needs to shift from his desk to a new work area in his office. Which ergonomic principle should he follow while moving his
Paul [167]

Answer:

One should be in neutral posture, which is the ergonomic principle that needs to be followed while moving our belongings from one location to the other. Its because in this position the work done is zero, and hence we never lose any energy. And this is the posture you should ensure while you are working. Also, the goods packed when moved in this manner, has least chance of wear and tear. Thus, the goods remain safe.

Also, Derek should keep things in a box with padding and then lift to move them to the new work area.

Explanation:

The answer is self explanatory.

3 0
3 years ago
What are the oop concept of java
mash [69]

Answer: OOP concepts in Java are the main ideas behind Java’s Object Oriented Programming. They are abstraction, encapsulation, inheritance, and polymorphism. Grasping them is key to understanding how Java works. Basically, Java OOP concepts let us create working methods and variables, then re-use all or part of them without compromising security.

HOPE THIS HELPED IS NOT SORRY.

4 0
2 years ago
Read 2 more answers
Other questions:
  • If you use a surrogate key, you must ensure that the candidate key of the entity in question performs properly through the use o
    5·1 answer
  • Suppose you want to delete an existing file from within Word. What would you do? A. Click on the File button, choose Recent, ope
    9·1 answer
  • What is the advantage of defining a target user?
    6·1 answer
  • Are one of the greatest features of Photoshop that allow nondestructive editing of images.
    6·1 answer
  • Complete the function void update (int *a, int *b), which reads two integers as argument, and sets a with the sum of them, and b
    8·1 answer
  • Ben pays his mobile bills, watches movies, and shops online using the Internet. Which internet activity does he perform?
    13·2 answers
  • Which of the following are input devices? Check all that apply.
    9·2 answers
  • Who is the intended audience of a pseudocode document?
    14·1 answer
  • Software that displays advertising material when online.
    12·2 answers
  • What do you mean by computer ethics?​
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!