Examlex

Solved

Public Abstract Class Car

question 28

Essay

public abstract class Car
{
    private String model;
    public abstract void color();
    public String getModel()
    {
         return model;
     }
    public void setModel(String modelName)
    {
         model = modelName;
     }
}

public class Honda extends Car
{
    public void color()
    {
System.out.println("red");
    }
}

public class Ford extends Car
{
    public void color()
    {
      System.out.println("blue");
    }
}

public class MyCars
{
    public static void main(String[] args)
    {
       Honda myHonda = new Honda();
       Ford myFord = new Ford();
  myHonda.setModel("My Honda is ");
       myFord.setModel("My Ford is ");
  System.out.print(myHonda.getModel());
  myHonda.color();
  System.out.print(myFord.getModel());
  myFord.color();
    }
}
In the above code, the myHonda.getModel() and myHonda.color() method calls produce different output from when the same methods are used with myFord . Explain why this is the case.


Definitions:

Post-Fordist Organizational Forms

A term describing new organizational structures that emerged after the decline of Fordist practices, characterized by more flexibility, decentralization, and use of technology.

Bureaucratic

Pertaining to a system of government or organization in which most of the decisions are made by state officials rather than by elected representatives.

Hierarchal Organizational Forms

Hierarchical organizational forms describe the structure of an organization that ranks its parts and positions in levels of importance and authority, with a clear chain of command from top to bottom.

Short-Term Employment

Employment situations that are temporary or have a fixed duration, often lasting for only a limited period.

Related Questions