Write a method sameDashes that takes two Strings as parameters and that returns whether or not they have dashes in the same places (returning true if they do and returning false otherwise). For example, below are four pairs of Strings of equal length that have the same pattern of dashes. Notice that the last pair has no dashes at all.
string 1: "hi--there-you." "-15-389" "criminal-plan" "abc"
string 2: "12--(134)-7539" "-xy-zzy" "(206)555-1384" "9.8"
To be considered a match, the Strings must have exactly the same number of dashes in exactly the same positions. The Strings might be of different length. For example, the following calls should each return true:
sameDashes("1st-has-more characters", "2nd-has-less")
sameDashes("1st-has-less", "2nd-has-more characters")
because the Strings each have two dashes and they are in the same positions. But the following calls should each return falsebecause the longer string has a third dash where the shorter string does not:
sameDashes("1st-has-more-characters", "2nd-has-less")
sameDashes("1st-has-less", "2nd-has-more-characters")
Method problem: For this problem, you are supposed to write a Java method as described. You should notwrite a complete Java class; just write the method(s) described in the problem statement.

Answers

Answer 1

In Java that compares two strings for dashes. The test only returns true if each string has the same amount of dashes in the same position in the strings.

What is java? and how to write method described in problem statement?

Java is a programming language and computing platform first released by Sun Microsystems in 1995. It has evolved from humble beginnings to power a large share of today’s digital world, by providing the reliable platform upon which many services and applications are built. New, innovative products and digital services designed for the future continue to rely on Java, as well.Java is fast, secure, and reliable. Developers use Java to construct applications in laptops, data center's, game consoles, scientific supercomputers, cell phones, and other devices.

I have to write a program in Java that compares two strings for dashes. The test only returns true if each string has the same amount of dashes in the same position in the strings.

Comparing the following two strings

String string1 = "two-twenty-nine"

String string2 = "ten-forty-five and I'm hungry."

with the above criteria would return true. It doesn't matter whether one string is longer than the other.

Any assistance would be appreciated!

I have tried:

- converting the strings to char arrays and then comparing the indexes

- Using String. index Of() for each string, and then creating a variable int new Start = String. index Of() with the index of the previous dash as the new starting point to look from

public static void sameDashes(String string1, String string2) {

   int count = 0;

   char index1 = ' ';

   char index2 = ' ';

   char dash = '-';

   char[] string1Array = string1.toCharArray();

   char[] string2Array = string2.toCharArray();

   while (count < string1Array.length && count < string2Array.length) {

       if (string1Array[index1] == dash && string2Array[index2] == dash) {

           System. out. print ln("true");

To learn more about Java refers to ;

https://brainly.com/question/26789430

#SPJ4


Related Questions

an e-mail virus involves sending an e-mail message with a modified field. true or false

Answers

False. Sending an email message with a changed field is how an email virus works.

What does computer email mean?

A desktop tool called e-mail enables users to exchange messages each other in order to communicate. Email, the equivalent of a letter in electronic form, has advantages over letters in regards to flexibility and speed. Email has several uses, one of which is automated voice respond. auto-forwarding and rerouting of messages

Why do people use email?

Email is used for numerous reasons, including communicating with friends, communicating with professors and superiors, gathering information, and sending applications for jobs, fellowships, and grants. Guess it depends on your objectives, the formality of your communications, the target market, and the desired outcomes will alter.

To know more about email visit:

https://brainly.com/question/15710969

#SPJ4

Your worksheet appears with a reduced view of each page and blue dividers where new pages begin. What view are you in

Answers

Your worksheet displays a condensed version of each page and blue dividers to indicate where new pages start (page break preview).

What does the response on the worksheet mean?

In an Excel document, a worksheet is a collection of cells organised in rows and columns. It is the location where data entering happens. With select the optimal rows and corresponding to the different columns, each worksheet serves as a huge table for organizing data.

What does a worksheet in the classroom mean?

Worksheets are often loose sheets of paper with exercises or questions on them for students to complete and record their responses. They are utilized in most courses to some extent, and there are two main varieties in the math curriculum where they are often used.

To know more about worksheet visit:

https://brainly.com/question/13129393

#SPJ4

Medicaid is known as the __________, since it is always billed after another plan has been billed, if other coverage exists.

Answers

Since Medicaid is always billed after another plan, if another kind of coverage is available, it is known as the dual-eligible Medi Medi beneficiaries.

What alternative names exist for Medicaid?

They could go by other names, such as "Medical Assistance" or "Medi-Cal." Millions of Americans, including some low-income individuals, families with children, pregnant women, the elderly, and people with disabilities, have access to Medicaid, a joint federal and state program, which offers free or inexpensive health coverage.

In the past, what was a Medicaid?

Medicare and Medicaid were both enacted into law in 1965 under the authority of Title XIX of the Social Security Act. Medicaid programs are set up to offer low-income people health insurance in every state, the District of Columbia, and the US territories.

To know more about Medicaid visit :-

https://brainly.com/question/17880152

#SPJ4

Which of the following is one of the primary advantages to using Active Directory to store DNS information

Answers

The primary advantages to using Active Directory to store DNS information is fault tolerance

Making it possible for domain client computers to locate a domain controller AND for domain controllers to locate one another in order to replicate changes to the Active Directory database is the major goal of DNS for Active Directory (AD).

Some recommendations to keep in mind when designing fault-tolerant systems for the canning department include:

1) To examine the software's dependability

2) To examine the system's redundancy structure for fault tolerance

3) To assess the use of reliability-oriented designs, programming approaches, and methods.

Four) Creating diverse

5) Resources and methods to be applied

6) The dependability of the software and hardware

Your question is incomplete ut most probably your full question was

Which of the following is one of the primary advantages to using Active Directory to store DNS information

a. fault tolerance b. zero configuration c. low maintenanced.

Learn more about dns at https://brainly.com/question/17163861

#SPJ4

Which of these is an example of the integrity principle that can ensure your data is accurate and untampered with :
Options of the questions are Given Below.
A: Using Encapsulating Security Payload
B: Using MACs (Message Authentication Codes)
C: Keeping a symmetric key secret
D: Implementing flood guards

Answers

(A). Using Encapsulating Security Payload

(B). Using MACs (Message Authentication Codes)

What kind of situation poses a threat to integrity?

A person using unauthorized access to a system to modify data in a file is an illustration of an integrity attack. Furthermore, the execution of unauthorized commands on a system could jeopardize the security of the entire system.

Which of these is a good illustration of how the confidentiality principle may protect your data?

Data is rendered illegible by encryption to all but those with the necessary password or key. You can guard sensitive files from being read or used by anyone who are not authorized to do so by encrypting them (for instance, using file passwords).

Which of the following can compromise the accuracy of information and data?

Human error, whether purposeful or inadvertent, can affect data integrity. Transfer mistakes, such as unwanted changes or data compromise, can happen when data is transferred from one device to another. bugs, malware/viruses, hacking, and other online dangers.

To know more about integrity visit:

https://brainly.com/question/14710912

#SPJ4

Compare the printout on the SDV screen (Brain) with the list you created and coded. Why didn’t the Brain have 1s and 0s on it? Can you identify how the code creates what you saw on the Brain?

Answers

The printout on the SDV screen (Brain) and the list I created and coded, are different because the code creates a representation of the data on the Brain, rather than displaying the data itself in the form of 1s and 0s.

The code is used to create the visualization on the Brain by interpreting the data and displaying it in a way that is understandable for humans. This visualization can include various elements such as text, images, and graphics. The code is responsible for creating the layout, design, and functionality of the visualization, as well as for processing and displaying the data.

What is the code about?

It is likely that the code uses various programming libraries and frameworks to create the visualization on the Brain, and these libraries and frameworks have their own methods for handling and displaying data.

The code may also use algorithms and data structures to process and organize the data before it is displayed on the Brain.

In all, the printout on the SDV screen (Brain) and the list I created and coded are different because the code creates a representation of the data on the Brain rather than displaying the data itself in the form of 1s and 0s. The code uses various programming libraries, frameworks, algorithms and data structures to process and display the data in a way that is understandable for humans.

Learn more about coding from

https://brainly.com/question/27639923

#SPJ1

Short focal-length lenses have a narrow angle vantage point, which magnifies objects

and makes them look bigger and closer.

True or false

Answers

Small aperture optics get a narrow angle of view, which enlarges and makes objects appear closer and larger. This claim is untrue.

What is the magnify word's root?

Magn is a Latin word with the meaning "great." Numerous English vocabulary words, notably magnificent, magnitude, and magnanimous, are derived from this root word. Magnifying glasses are a simple way to recall that magn meaning "great," since they amplify small objects to great proportions.

What would it mean when something is magnified?

When someone exaggerates a situation, they view it as much more serious than it actually is, which leads them to respond to it or the relevant personnel in ways that lead to further issues.

To know more about Magnify visit :

https://brainly.com/question/28417569

#SPJ4

Which of the following statements is true of geographic top-level domains (TLDs)?
Select one:
a. They are used by the organizations that provide information services.
b. They are used to promote business and tourism.
c. They are limited to members of a defined community.
d. They are owned by corporations to control use of their brands.

Answers

They are employed in the marketing of commerce and travel. Whichever of the following is accurate about geographic top-level domains (TLDs).

Do top-level domains include TLD?

After the root domain in the Internet's hierarchical Domain Name System, a top-level domain (TLD) is one of the domains at the highest level. In the name space's root zone, top-level domain names are deployed.

What do TLD names for top-level domains mean?

A top-level domain (TLD) sits after the root zone in the DNS hierarchy as the first stop. A TLD, or top-level domain, is the part of a domain name that comes after the last dot. The TLD for "gobgle.com," for instance, is ".com." ' and are a few additional well-known TLDs.

To know more about top-level domains visit :-

https://brainly.com/question/28041008

#SPJ4

the ____ function is used to interchange the contents of two string variables.
a. iterator
b. swap
c. change
d. traverse

Answers

Answer:

b. swap

Explanation:

Above all else, what must be protected to maintain the security and benefit of an asymmetric cryptographic solution, especially if it is widely used for digital certificates

Answers

To retain the security and benefit of an asymmetric cryptographic solution, especially if it is widely applied to digital certificates, the private key must be maintained.

Which of the subsequent algorithms is used for asymmetric encryption?

Modern computers encrypt and decrypt messages using the RSA method. An asymmetric cryptography algorithm is used.

Asymmetric public key cryptography employs a total of one, two, three, or four keys?

Asymmetric cryptography, sometimes called public-key cryptography, is a method for encrypting and decrypting messages and safeguarding them from unwanted access or use. It uses a pair of linked keys, a public key and a private key.

To know more about cryptographic visit :-

https://brainly.com/question/3026658

#SPJ4

give 4 example for echinodermis cnidarians poriferas platyhilminthes nematodes and annerids

Answers

Answer:

Among the largest and most important invertebrate phyla are Porifera (sponges), Cnidaria (jellyfish, corals, and sea anemones), Platyhelminthes (flatworms), Nematoda (roundworms), Mollusca (snails, bivalves, squids, and octopuses), Annelida (segmented worms), Arthropoda (horseshoe crabs, spiders, crabs, centipedes, ..

The process of sending print jobs from the print queue to the printer is called? a. spooling b. queuing c. redirecting d. printing.

Answers

Printing is the action of sending print jobs from the print queue to the printer.

Which of the following describes a print server's role?

By establishing a network connection with the server, computers may interact with nearby printers. The print server guards printers from overloads. It manages the allocation of ’s due to devices and queues them in order to maintain orderly operation and avoid overloading printer hardware.

The message is produced using the print() method to a standard output device, such the screen. The message can be a phrase or any other object, and the object will be converted to a string before it is presented on the screen.

To know more about Print server's, refer:

brainly.com/question/29738751

#SPJ4

Summarize the changes that you would need to make to your parking lot program if the lot grew to an arbitrarily large size.

Answers

If the parking lot grew to an arbitrarily large size, there are several changes that would need to be made to the parking lot program:

The data structure used to store information about the parking spaces in the lot would need to be able to handle a large number of spaces. This might involve using a dynamic data structure, such as a linked list or hash table, rather than a fixed-size array.
The algorithm for finding an available parking space would need to be optimized for large lots. This could involve using an indexing scheme or a more efficient search algorithm to quickly locate an open space.
The program would need to handle the case where all spaces are occupied. This might involve adding a waitlist or notification system to alert users when a space becomes available.
The program would need to be able to handle large numbers of users simultaneously. This might involve using a distributed system or implementing concurrency controls to ensure that the program can handle multiple requests at the same time.
The program would need to be tested and debugged thoroughly to ensure that it can handle the larger size and increased usage of the parking lot.

There are critical times when memory problems often manifest themselves. Match each critical time on the left with the corresponding cause of the memory problems on the right.
This event can require more memory and can cause problems if there is not enough memory when it occurs.
- Software installation
Memory is not properly seated or missing/the motherboard is defective.
- First boot of a new computer
Incompletely or improperly doing this can cause errors that appear to be memory-related.
- Hardware installation or removal
The memory is not compatible and was not installed and configured properly.
- Memory upgrade
At these critical times, memory problems can manifest themselves as follows:
First boot of a new computer - memory is not properly seated, missing, or the motherboard is defective.
After a memory upgrade - ensure that the memory is compatible and was installed and configured properly.
After software installation - new software can require more memory and can cause problems if there is not enough memory for the software.
After hardware installation or removal - incompletely or improperly installed hardware can cause errors that appear to be memory-related.

Answers

Software installation, First boot of a new computer, Hardware installation or removal, Memory upgrade is the correct match.

How do I upgrade my memory?

A RAM or system memory increase may be suggested to enhance a computer's performance. An upgrade entails either replacing the outdated memory modules with a set of new, greater capacity modules or adding additional memory modules to the existing ones.

Is memory expansion worthwhile?

Your PC's performance will significantly improve whether you choose to boost your memory or storage. Your slow computer will function more quickly when you add extra RAM since it will be able to handle more tasks concurrently.

To know more about Memory upgrade visit

brainly.com/question/21106765

#SPJ4

a(n) ______ machine enables you to install a second operating system on a computer.

Answers

A virtual machine (VM) is a type of compute resource that uses software rather than a real computer to run applications and run programs. A physical "host" machine hosts one or more virtual "guest" machines.

What advantages do virtual machines have?

A firm can save time, money on management, and physical space by running numerous OS instances on a single piece of hardware because the software is distinct from the actual host computer.

What VM software is the most widely used?

The top four virtualization-friendly programs are VMware Fusion, Parallels Desktop, Oracle VM Virtual Box, and VMware Workstation. Really great features are provided for free by Oracle VM Virtual Box. It is also compatible with Mac, Windows, and Linux.

To know more about virtual machine visit :-

https://brainly.com/question/30044516

#SPJ4

Which of the following describes an engine where the pistons move horizontally rather than vertically or diagonally

Answers

A "boxer" engine is one in which the pistons move in opposition to one another and the cylinders are arranged horizontally rather than vertically, as in inline and V-type engines.

Exactly what Engines are devices that transform energy from a variety of sources into mechanical force and motion:

additionally: a device or item that acts as an energy source. Quasars' engines might be black holes, like a locomotive.

How come it's called an engine?

The word "engine" derives from the Latin ingenium, which also refers to mental aptitude or cunning. The term acquired the meanings of inventiveness, contrivance, deception, and malice throughout its transition from French to English.

To know more about engine visit:

https://brainly.com/question/1232655

#SPJ4

g Shift registers and counters use hardware _____________________ for their internal data storage.

Answers

A series of core registers coupled together to generate a clock-driven data shift is known as shift register counters. Johnson counters and ring counters are two of the most popular types of these.

What is the purpose of a shift register?

Shift registers are widely used in converters that convert parallel data to serial data or vice versa. Shift registers can also be employed as delay circuits and digital pulse extenders.

Can data be stored in a shift register?

A shift register is represented by a pair of terminals that are placed next to one another, vertically on either side of the loop boundary. When an iteration is finished, data is stored in the terminal on the right side of the loop, which has an up arrow.

To know more about shift register here:-

brainly.com/question/14096550

#SPJ4

To represent​ relationships, ________ are added to tables.
A. locking keys
B. value keys
C. entity keys
D. normalized keys
E. foreign keys

Answers

foreign keys, Tables are enhanced with foreign keys to represent relationships.

What does "foreign key" mean?

A row or columns of information in one table that relate to the distinct data values, frequently the primary key data, in another table are said to be "foreign keys." In a relational database, foreign keys link between two or more tables.

How do primary keys and foreign keys differ?

A main key typically emphasizes the table's uniqueness. It guarantees that the value in that particular column is distinct. Typically, a foreign key is utilized to establish a connection among the two tables.

To know more about foreign key visit :

https://brainly.com/question/15177769

SPJ4

*** JAVA ***
Retype and correct the code provided to combine two strings separated by a space.
secretID.concat(spaceChar);
secretID.concat(lastName);
import java.util.Scanner;
public class CombiningStrings {
public static void main (String [] args) {
String secretID = "Barry";
String lastName = "Allen";
char spaceChar = ' ';
/* Your solution goes here */
System.out.println(secretID);
return;
}
}

Answers

 * This program is used to Concatenate the strings *

// import statement

import java.lang.*;

 // Create a class CombiningStrings

public class CombiningStrings

{

 // Create a main method

public static void main(String[] args)

   {

  String secretID = "Barry";

String lastName = "Allen";

char spaceChar = ' ';

 /* Your solution goes here */

// Convert character data type to string data type

// The concatenation operation occurs with two string data

//types

String strSpaceChar = Character.toString(spaceChar);

// Concatenate two strings secretID and strSpaceChar

secretID = secretID.concat(strSpaceChar);

 // Concatenate two strings secretID and lastName

   secretID = secretID.concat(lastName);

// Display secretID

System.out.println(secretID);

 return;

   }

}

To know more about JAVA visit:

https://brainly.com/question/29897053

#SPJ4

The Query Editor of the Management Studio lets you enter and execute all types of
A) SELECT statements
B) DDL statements
C) DML statements
D) SQL statements

Answers

All DDL statements are inputtable and executable in the Management Studio's Query Editor.

What key is needed to run a query in the query Editor?

Pressing CTRL+L when creating a query will execute the selected text or all of the statements in the Query Editor window, displaying the execution plan.

In Microsoft SQL Server Management Studio, how do you open the query editor?

Select New Query from the context menu by selecting the server node that is currently associated with a Database Engine instance. In addition to connecting to the same instance of the Database Engine, this will open a Database Engine Query Editor window and set the window's database context to the login's default database.

To know more about DDL statements visit :-

https://brainly.com/question/29834976

#SPJ4

the unit implemented a quality improvement program to address cleint pain relife. which set of criteria is the best determinant that the goal has been met. quislet

Answers

An organization's healthcare results can be improved by implementing a QI program, which is a collection of targeted tasks intended to track, evaluate, and enhance the quality of processes.

What does a QIP mean for healthcare?

Each and every Medicare Advantage Organization (MAO) is required to implement a Quality Improvement Project (QIP) and a Chronic Care Improvement Program (CCIP) as part of their mandatory Quality Improvement (QI) Program as outlined in 42 CFR 422.152. For every contract, MAOs are required to carry out a CCIP and QIP.

What are the six areas where quality may be improved?

Safety, effectiveness, patient-centeredness, timeliness, efficiency, and equity are the six characteristics of quality in healthcare that Don Berwick identifies.

To know more about QI program visit :-

https://brainly.com/question/29555477

#SPJ4

Parker has an Android smartphone. Which type of processor is used in his mobile device?
a. x86
b. Intel Atom
c. ARM
d. None of these answers

Answers

Parker owns an Android phone. His mobile device has an ARM-type processor.

The definition of CPU clock rate?

Every second, a large number of instructions (low-level computations like arithmetic) from various programs are processed by your CPU. The clock speed, expressed in GHz, reveals how many cycles your CPU performs per second (gigahertz).

How is RAM used?

Random-access memory is referred to as RAM. Data is generally saved in your computer's RAM, or short-term memory, as the processor need it. Contrast this with long-term data stored on your hard disk, which is still accessible even after your computer has been switched off.

To know more about ARM visit :-

https://brainly.com/question/24117933

#SPJ1

In an earlier assignment you modeled an inheritance hierarchy for dog and cat pets. You can reuse the code for that hierarchy in this assignment. Write a program that prompts the user to enter data (name, weight, age) for several Dog and Cat objects and stores the objects in an array list. The program should display the attributes for each object in the list, and then calculate and display the average age of all pets in the list using a method as indicated below:
public static double calculateAverage( ArrayList list )
{
... provide missing code ...
}
previous code
chihuahua
public class Chihuahua extends Dog
{
public void bark()
{
System.out.println("Bow wow");
}
}
dog
public class Dog
{
private String name;
private double weight;
private int age;
public String getname(String n)
{
name = n;
return n;
}
public double getweight(double w)
{
weight = w;
return w;
}
public int getage(int a)
{
age = a;
return a;
}
public void bark()
{
}
}
import java.util.Scanner;
public class DogCatTest
{
public static void main( String [] args)
{
Scanner scan = new Scanner(System.in);
System.out.println("Enter name");
String name = scan.nextLine();
System.out.println("Enter weight");
double weight = scan.nextDouble();
System.out.println("Enter age");
int age = scan.nextInt();
Dog [] dogCollection = { new Chihuahua(), new GoldenRetriever()};
for( int i = 0; i < dogCollection.length; i++ )
dogCollection[ i ].getname(name);
System.out.println(name);
for( int i = 0; i < dogCollection.length; i++ )
dogCollection[ i ].getweight(weight);
System.out.println(weight);
for( int i = 0; i < dogCollection.length; i++ )
dogCollection[ i ].getage(age);
System.out.println(age);
for( int i = 0; i < dogCollection.length; i++ )
dogCollection[ i ].bark();
System.out.println("Enter name");
String cname = scan.nextLine();
System.out.println("Enter weight");
double cweight = scan.nextDouble();
System.out.println("Enter age");
int cage = scan.nextInt();
Cat1 [] catCollection = { new SiameseCat(), new SiberianCat() };
for( int i = 0; i < catCollection.length; i++ )
catCollection[ i ].getname(cname);
System.out.println(cname);
for( int i = 0; i < catCollection.length; i++ )
catCollection[ i ].getweight(cweight);
System.out.println(cweight);
for( int i = 0; i < catCollection.length; i++ )
catCollection[ i ].getage(cage);
System.out.println(cage);
for( int i = 0; i < catCollection.length; i++ )
catCollection[ i ].meow();
}
}
public class GoldenRetriever extends Dog
{
public void bark()
{
System.out.println("Bow wow");
}
}
public class SiameseCat extends Cat1
{
public void meow()
{
System.out.println("Meow");
}
}
public class SiberianCat extends Cat1
{
public void meow()
{
System.out.println("Meow");
}
}
public class Cat1
{
private String name;
private double weight;
private int age;
public String getname(String n)
{
name = n;
return n;
}
public double getweight(double w)
{
weight = w;
return w;
}
public int getage(int a)
{
age = a;
return a;
}
public void meow()
{
}
}

Answers

Java program that shows the use of inheritance hierarchy, the code reuses the attributes of the class objects.

Importance of applying inheritance:

In this case of pets (dogs and cats), applying inheritance allows a much shorter and more structured code. Also, reusable since we can add classes of other pets such as birds, rabbits, etc., all of them also belonging to the Pet superclass.

Reserved words in a java code that enforces inheritance:

extendsprotectedSuper

Here is an example:

Java code

import java. io.*;

import java.util.ArrayList;

import java.io.BufferedReader;

public class Main

{

// ArrayList of Pet objets

 public static ArrayList < Pets > arraypets = new ArrayList < Pets > ();

 public static void main (String args[]) throws IOException

 {

   BufferedReader data =

     new BufferedReader (new InputStreamReader (System. in));

   //Define variables

   String aws;

   String str;

   double w;

   String n;

   int a;

   double average;

   do

     {

//Data entry System.out.println ("Pet species? ");

System.out.println ("(1) Cat ");

System.out.println ("(2) Dog ");

aws = data.readLine ();

System.out.print ("Enter name: ");

n = data.readLine ();

System.out.print ("Enter weight: ");

str = data.readLine ();

w = Double.valueOf (str);

System.out.print ("Enter age: ");

str = data.readLine ();

a = Integer.valueOf (str);

if (aws.equals ("1"))

  {

    Cat cat = new Cat (n, w, a);

      arraypets.add (cat);

      average = cat.averageAges (a);

  }

else

  {

    Dog dog = new Dog (n, w, a);

      arraypets.add (dog);

      average = dog.averageAges (a);

  }

System.out.print ("Enter more data? (y/n)");

aws = data.readLine ();

aws = aws.toLowerCase ();

     }

   while (!aws.equals ("n"));

//Calculate average of pets age

   average = average / arraypets.size ();

   average = Math.round (average * 100.0) / 100.0;

// Output

   System.out.println ("Attributes for each object in the list: ");

 for (Pets arraypet:arraypets)

     {

System.out.println (arraypet);

     }

   System.out.println ("Number of pets: " + arraypets.size ());

   System.out.println ("Average age of all pets in the list: " + average);

 }

}

class Pets

{

 protected String Name;

 protected double Weight;

 protected int Age;

 public Pets ()

 {

 }

 public Pets (String name, double weight, int age)

 {

   this.Name = name;

   this.Weight = weight;

   this.Age = age;

 }

 //Returning values formatted by tostring method

 public String toString ()

 {

   return "Nombre: " + this.Name + ", Peso: " + this.Weight + ", Edad: " +

     this.Age;

 }

 public void CalculateAverage ()

 {

 }

}

class Dog extends Pets

{

 public Dog ()

 {

   super ();

 }

 public Dog (String name, double weight, int age)

 {

   super (name, weight, age);

 }

//Adding the ages of the pets  double averageAges (double a)

 {

   a += a;

   return a;

 }

}

class Cat extends Pets

{

 public Cat ()

 {

   super ();

 }

 public Cat (String name, double weight, int age)

 {

   super (name, weight, age);

 }

//Adding the ages of the pets

 double averageAges (double a)

 {

   a += a;

   return a;

 }

}

To learn more about inheritance hierarchy in java see: https://brainly.com/question/15700365

#SPJ4

A computer user has provided input, and the computer system has completed its processing functions, but the user does not have an immediate use for the information that resulted from the processing. What type of peripheral device might then be used for the next step of the process?

Answers

The following stage of the process might then make use of a peripheral device of the hard disk variety.

What should you do if a computer headset that is connected in isn't functioning properly?

What should you do if a computer headset that is connected in isn't functioning properly? Remove the headset's plug. -Refresh the device driver. - Change the computer's power cable.

Detailed instructions that explain to the computer how to transform data into information?

The software, or the carefully thought out, sequential instructions needed to transform data into information, is what actually makes computers useful. Software categories. In general, software can be divided into system software and applications software.

To know more about peripheral device visit :-

https://brainly.com/question/4297339

#SPJ4

running apps in which mode ensures that a poorly written app does not affect system stability?

Answers

Running apps in user mode makes guarantee that a bad app won't have an impact on system stability.

What do the terms OS kernel and user mode mean?

The user mode and kernel mode of a CPU on a computer running Windows are two distinct operating systems. Depending on the type of code it is running, the processor alternates between the two modes. User mode is used for applications, and kernel mode is used for the essential parts of the operating system.

What are some user mode examples?

A computer program is in user mode when it is executing. Word processing software, PowerPoint, viewing a PDF file, and internet browsing are a few examples. The computer is operating in user mode because they are application programs.

To learn more about user mode visit:

brainly.com/question/13383370

#SPJ1

When the positive integers with exactly three positive divisors are listed in ascending order, what is the fifth number listed

Answers

The first number will be an even square and the others wll be odd.

4 = 3 divisors; 9  = 3 divisors; 25 = 3 divisors; 49 = 3 divisors; 121 = 3 divisors.

How can I determine the amount of positive divisors?

Exhaustive trial division is the simplest approach for calculating divisors. The set of positive divisors for an integer n is made up of those that divide evenly when we divide it by each of the integers 1, 2, 3,..., n. This is how we get the positive divisors for an integer n.

What is the quick method for calculating a number's divisors?

The following formula can be used to determine how many powers of prime numbers n can have as its total divisors. When N=paqbrc. The total number of divisors is then equal to (a+1)(b+1)(c+1).

To know more about integers visit

brainly.com/question/15276410

#SPJ4

- What is the function of these 3 types of application software
Word Processing
Spreadsheet
Database

Answers

A word processor is a computer application used to write and edit documents, arrange the text's layout, and preview the printed version on a computer screen.

What purpose does spreadsheet software serve?

A spreadsheet is a piece of software that you can use to quickly execute mathematical operations on statistical data, add up many columns of numbers, or calculate averages and percentages.

What use does database software serve?

Users of database software can centrally manage, store, access, and save data. Additionally, it makes it simple for users to control who has access to the database and what permissions they have, protecting the data.

To learn more about software visit:

brainly.com/question/985406

#SPJ1

A dial-up access network typically has high ___________ delays compared to most other access networks. Pick the best answer

Answers

With a dial-up connection, you can access the Internet at data transfer rates (DTR) of up to 56 Kbps using a regular phone line and an analog modem.

Dial-up access is it?

refers to using a modem and the public telephone network to connect a device to a network. Dial-up access is essentially identical to a phone connection, with the exception that computer devices rather than people are the participants at both ends.

Dial networking: What is it?

Dial-up networking is the collection of protocols and software used to link a computer to an online service, a distant computer, or an Internet service provider using an analog modem and POTS (plain old telephone system). The most popular kind of computer connection to the Internet is dial-up networking.

To know more about DTR visit:-

https://brainly.com/question/12914105

#SPJ4

LANs, WANs, and MANs all provide users with an accessible and reliable network infrastructure. Which of the below are the most important network differentiating dimensions? Reliability and timing Confidentiality and performance Security and cost Cost and performance

Answers

Performance and price what features distinguish networks the most? Timing and dependability Performance and confidentiality Cost and safety Performance and price.

LAN MAN WAN: What is it?

An office building, a school, or a home may have a local area network (LAN) that links a number of nearby computers. A state, province, or country, for example, can be covered by a wide area network (WAN).

Which four types of wireless communication networks are under the Metropolitan Area Network (MAN) umbrella?

Performance and confidentiality Cost and safety Performance and price. There are four different types of wireless networks, each with a specific purpose: wireless local area networks, wireless metropolitan area networks, wireless personal area networks, and wireless wide area networks.

To know more about LANs visit :-

https://brainly.com/question/13247301

#SPJ4

Define the term Project brief? why is it important to do planning?Atleast 2 paragraph.

Answers

A project brief is a concise explanation of the important components of your project. Consider it a high-level overview for project stakeholders and cross-functional collaborators.

What is a project brief?

Your project brief should explain your project requirements without overwhelming your stakeholders with specifics. The project brief is a document that summarizes the project.

The paper highlights all of the project's significant and necessary components. This comprises the project scope, project objectives, and the ambitions or goals that the project seeks to attain.

Therefore, A project brief is a concise overview of your project's key components. Consider it an executive summary for project stakeholders and cross-functional collaborators.

To learn more about the project brief, refer to the link:

https://brainly.com/question/25009327

#SPJ1

Other Questions
How does the narrator describe himself in chapter 1? What is the perimeter? Help plz..And No links!! I repeat No links!! What is the area of the faces in square units? PLEASE HELP QUICK!!! Which of the following would be a reasonable unit for the rate constant of a second order reaction?1. mol/L.sec2. mol2/sec.L23. 1/sec4. L/mol.sec5. L2/mol2.sec Which of the following results best refutes the alternative hypothesis that selective permeability is a consequence of the cell wall what is the correct factorization of 100^12 According to the 2000 U.S. Census, 7 out of every 25 homes are heated by electricity. At this rate, predict how many homes in a community of 12,000 would be heated by electricity.a.6,725 homesb.3,100 homesc.3,360 homesd.4,020 homes I wish something pleases my husband.Correct this sentence Create a personal motto that reflects your values and can calm or inspire you. pls help ill give brainliest Freddy is helping buy ingredients for salads for the school spaghetti dinner he bought 10 pounds of onions at $0.69 per pound 100 pounds of tomatoes at $0.99 pound 1,000 pounds of break cumbs at $0.09 per pound and 100 pounds of lettuce at $0.69 per pound which of the items he bought cost the most? 17v = 62 (exponential equations with logarithms, solve) Do you sometimes make bad decisions? what are they? Please help me find,three meaning quotes from Jason Reynolds ghost 1-9 Hello can someone help me with this thig? ;-; What is an action plan with example? Solve for x, its confusing me because of how its split Evaluate.4 (-3) = What claim does the author make about Shaun white in the passage? Support your answer with evidence from the passage (Passage is Included)