Questions
What sociological concepts or ideas are presented in the film City of God? Mention the authors.

What sociological concepts or ideas are presented in the film City of God? Mention the authors.

In: Psychology

Discuss evolutionary factors that led to the emergence of PEPcarboxylase. (Mention C4 and CAM plants)

Discuss evolutionary factors that led to the emergence of PEPcarboxylase. (Mention C4 and CAM plants)

In: Biology

what are the principles of scientific method used in a research. (mention and explain them in...

what are the principles of scientific method used in a research. (mention and explain them in details)

In: Operations Management

Java. You are creating a 'virtual pet' program. The pet object will have a number of...

Java.

You are creating a 'virtual pet' program. The pet object will have a number of attributes, representing the state of the pet. You will need to create some entity to represent attributes in general, and you will also need to create some specific attributes. You will then create a generic pet class (or interface) which has these specific attributes. Finally you will make at least one subclass of the pet class which will be a specific type of pet, and at least one instance of that class.

Attributes
An attribute is a characteristic of a pet. Each attribute is essentially a list of values. For example, a hunger attribute may have values from "famished" through "content" to "bloated." There should be some way to check the value of the attribute, as well as to increase and decrease the value. Note that you will be expected to create some sort of abstract data type (ADT) to represent the attribute. You are not yet building SPECIFIC attributes (like hunger or happiness) but a type that represents the common characteristics of all attributes. You might use an interface or an abstract class to generate your abstraction, but plan it first as an abstract data type.

Specific Attributes
Once you have created a generic attribute class, make some subclasses to represent the specific attributes you want your pets to have. If you designed the ADT well, creating specific subclasses should be quite easy. The main method of the specific classes should test the main functionality of the class.

Making your abstract pet
Now create a pet class that uses the attributes you have generated. This class is also abstract, as it represents just a type of pet. It will include attributes as data members, and it may also have other characteristics. You may also add methods that indicate actions the user can take with the pet, including things like feed and play (which may affect attributes) and perhaps other activities like rename (which might change another data member of the pet) and sleep (which might indicate the passage of time.)

Build a specific pet class
Finally you should be able to build a specific type of pet (like a lizard or a unicorn) that inherits from the pet class. This should begin (of course) with characteristics derived from the abstract pet, but you could then add new attributes or behaviors specific to your type of pet.

The main method of this pet class should instantiate an instance of the pet and indicate all the things it can do.

Create an interface for interacting with the pet.
Build some type of tool for interacting with the pet. At minimum this should allow the user to create a pet, interact with it in the ways you have defined, save its current status for future play (using object serialization) and load a previously saved pet.

In: Computer Science

The files provided contain syntax and/or logic errors. In each case, determine and fix the problem,...

The files provided contain syntax and/or logic errors. In each case, determine and fix the problem, remove all syntax and coding errors, and run the program to ensure it works properly.

3.

public abstract class DebugBoat

{

   String boatType = new String();

   int passengers

   String power = new String();

   public FebugBoat(String bt)

   {

      boatType = bt;

   }

   public boolean equals(otherBoat)

   {

      boolean result;

      if((passengers == otherBoat.passengers) && (power.equals(otherBoat.power)))

         result = true;

      else

         result = true;

      return result

   }

   public String toString()

   {

      return("This " + boatType + "boat carries " + passengers +

        " and is powered by + power);

   }

   public abstract void setPower();

   public abstract void setPassengers();

}

// Two boats should be equal

// if they hold the same number of passengers

// and also have the same power source

public class DebugEleven3

{

   public static void Main(String args[])

   {

      DebugRowboat redBoat = new DebugRowboat();

      DebugRowboat blueBoat = new DebugRowboat();

      System.out.print("The two boats are");

      if(redBoat = blueBoat)

         System.out.println(" equal");

      else

     (" not equal");

   }

}

public class DebugRowboat extends DebugBoat

{

   public DebugRowboat()

   {

      super("row");

      setPower();

   }

   public void setPassengers()

   {

      super.passengers = 2;

   }

   public void setpower()

   {

      super.power = "oars";

   }

}

4.

public abstract class DebugBoat

{

   String boatType = new String();

   int passengers

   String power = new String();

   public FebugBoat(String bt)

   {

      boatType = bt;

   }

   public boolean equals(otherBoat)

   {

      boolean result;

      if((passengers == otherBoat.passengers) && (power.equals(otherBoat.power)))

         result = true;

      else

         result = true;

      return result

   }

   public String toString()

   {

      return("This " + boatType + "boat carries " + passengers +

        " and is powered by + power);

   }

   public abstract void setPower();

   public abstract void setPassengers();

}

// Creates and displays an array of boats -

// some are rowboats; some are ocean liners

import java.util.*;

public class DebugEleven4

{

   static Scanner input = new Scanner(System.in);

   static DebugBoat[] boatArray = new DebugBoat[5];

   public static void main(String[] args)

   {

      buildArray;

      displayArray;

   }

   public static void buildArray()

   {

     char boatType;

     for(x = 0; x < boatArray.length; ++x)

     {

        boatType = getBoat();

        if(boatType =='r')

         boatArray[x] = DebugRowboat();

        else

          boatArray[x] = new DebugOceanLiner();

     }

   }

   public static char getBoat()

   {

      String boatType;

      System.out.println("Enter r for rowboat; o for ocean liner ");

      boatType = input.next();

        

      return boatType.charAt(0);

   }

   public static void displayArray()

   {

      for(int x = 0; x < boatArray.length)

      System.out.println("Boat #" + (x + 1) + " " +

         boatArray[x].toString());

   }

}

public class DebugOceanLiner extends DebugBoat

{

   public DebugOceanLiner()

   {

      super("ocean liner ");

      setPassengers();

  }

   public void setPassengers()

   {

      super.passengers = 2400;

   }

   public void setPower()

   {

      superpower = "four engines";

   }

}

public class DebugRowboat extends DebugBoat

{

   public DebugRowboat()

   {

      super("row");

      setPower();

   }

   public void setPassengers()

   {

      super.passengers = 2;

   }

   public void setpower()

   {

      super.power = "oars";

   }

}

In: Computer Science

Write an abstract/brief summary of the Economic and Social Cost of the Opioid Crisis in the...

Write an abstract/brief summary of the Economic and Social Cost of the Opioid Crisis in the US. Provide some data/research about this problem. Please write as much as you can and don't copy everything from the internet.

In: Economics

i need a research talks about High performance concrete that's include 1.abstract 2.summary of the research...

i need a research talks about High performance concrete that's include

1.abstract

2.summary of the research

3.objective

4.methodology

5.result

6.future work

7. resources

In: Civil Engineering

I am about to start my undergraduate thesis, I need an interesting topic related to Marketing...

I am about to start my undergraduate thesis, I need an interesting topic related to Marketing and internet. Describe how the content and abstract would be. And how will be the research method to accomplish? and some recommendations if it is possible

In: Operations Management

Give reasonably brief, but complete answers to the following. 10. a) Suppose class Y is derived...

Give reasonably brief, but complete answers to the following.
10. a) Suppose class Y is derived from class X.  Each class declares
    a constructor and a destructor.  Class Y has a string member 
    object that has a constructor and destructor. In what order do 
    the three constructors and destructors run when instances of 
    class Y are created and destroyed?
    
    b) Should X's destructor be declared virtual? Why or why not, 
    and what difference would it make?

--------------------------------------------------------------------
11. What is a pure virtual function?  Why would you define a pure
    virtual function? Give an example of a pure virtual function.

--------------------------------------------------------------------
12. What is an abstract base class?  What does it do? Why would you
    make a class abstract?

--------------------------------------------------------------------

In: Computer Science

Give reasonably brief, but complete answers to the following. 10. a) Suppose class Y is derived...

Give reasonably brief, but complete answers to the following.
10. a) Suppose class Y is derived from class X.  Each class declares
    a constructor and a destructor.  Class Y has a string member 
    object that has a constructor and destructor. In what order do 
    the three constructors and destructors run when instances of 
    class Y are created and destroyed?
    
    b) Should X's destructor be declared virtual? Why or why not, 
    and what difference would it make?

--------------------------------------------------------------------
11. What is a pure virtual function?  Why would you define a pure
    virtual function? Give an example of a pure virtual function.

--------------------------------------------------------------------
12. What is an abstract base class?  What does it do? Why would you
    make a class abstract?

--------------------------------------------------------------------

In: Computer Science