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
Online library catalogs can direct you to your closest library. (1 point)<br> True<br> False
Kitty [74]

Answer:

True

Explanation:

8 0
3 years ago
La sentencia de ASIGNAR es una sentencia de entrada de datos, verdadero o falso ?
Akimi4 [234]

Answer:

sorry can´t understand langues

Explanation:

cant

7 0
2 years ago
should variables that contain numbers always be declared as integer or floating-point data types? why or why not? name potential
Stells [14]

No, it is not necessary that variables that contain numbers should always be declared as integer or floating-point data types.

It is not necessary that variables that contain numbers should be declared as integer and floating point data types. Because number can be declared with different data types.  As we know that data type is a vital aspect in programming. It describes the type of a value that is contained in a variable. It is the data type based on which memory is allocated to a number or any type of variables.

Numbers can be whole decimal/fractional, signed, unsigned, small, and long. Simply, they exist in a variety of values. According to their values range, the amount of memory is reserved.

Different programming languages offer different data types to store numbers, depending on their types and size. Let’s consider some examples of data types used in programming languages in order to declare variables holding numbers.

  • In Python int, float, and complex are the data types used to declare number type variables.
  • SQL uses INTEGER, SMALLINT , BIGINT , NUMERIC() , and DECIMAL() data types for numbers.
  • To deal with number type variables, Java has six predefined data types, such as int, long, short, byte, float, and double.
  • JavaScript uses a single data type called 'number' to declare numbers.
  • In C++, two fundamental data types, int and float, are used to represent numeric variables. But C++ is not only limited to these two data types. The data type char can also store numbers. Other data types for declaring numbers as variables are derived from int, float and char, such as short int, long int, signed int, unsigned int, double, long double, signed char, unsigned char etc. etc.

So in concluding remarks, declaring a number type variable is not only limited to using integers and floating-points data types. Rather it entirely depends on the respective programming language, and size and type of the number to be stored in the variable.

You can learn more about data types at

brainly.com/question/13438922

#SPJ4

6 0
1 year ago
Assume that a program uses the named constant PI to represent the value 3.14. The program uses the named constant in several sta
mihalych1998 [28]

Answer:

The advantage for the above condition is as follows:-

Explanation:

  • If a user creates a defined constant variable and assigns a value on its and then uses that variable instead of the value, then it will a great advantage.
  • It is because when there is a needs to change the value of that variable, then it can be done when the user changes the value in one place. There is no needs to change the vale in multiple places.
  • But if there is a value in multiple places instead of a variable and there is no constant variable, then the user needs to change the value in multiple places.
7 0
3 years ago
What are some of the challenges that could arise from setting up a file management system on a computer?
emmainna [20.7K]
File management is set of methods for naming, storing and handling files. <span>A few key things that should be taken into consideration are: date, genre, occasion, and subject. After setting up a file management system on a computer the following challenges could arise: </span>standardize file naming, folder structure, metadata use and more. .
5 0
3 years ago
Other questions:
  • Blender questions
    8·1 answer
  • Please help will mark brainiest
    8·1 answer
  • Which increases the rate of soil formation?
    10·1 answer
  • Technician A says that to cover all possible vehicle conditions, coolant must have a high freezing point. Technician B says cool
    6·2 answers
  • Psychographics may also be called A. personality analytics. B. social group dynamics. C. lifestyle analysis. D. opinion insight.
    6·1 answer
  • To view the results of a query, open it by pressing and holding or right-clicking the query in the navigation pane and tapping o
    10·1 answer
  • Kelly is a college sophomore majoring in computer science. She is interested in gaining exposure to the most useful and current
    14·1 answer
  • What is a geam in the ggplot2 system?
    5·1 answer
  • Which of the following are input devices? Check all that apply.
    9·2 answers
  • If a folder exists on an NTFS partition, which permission is needed by a user who needs to set security permissions on the folde
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!