程序代做CS代考 javascript Java Potato – cscodehelp代写

Potato

JavaScript is disabled on your browser.

Skip navigation links

Package
Class
Tree
Deprecated
Index
Help

All Classes

SEARCH:

JavaScript is disabled on your browser.

Summary: 
Nested | 
Field | 
Constr | 
Method

Detail: 
Field | 
Constr | 
Method

 

Class Potato

java.lang.Object

AbstractFood

Potato

All Implemented Interfaces:
Food

public class Potato
extends AbstractFood

This is a potato. It can be raw, baked, twice-cooked, or burnt.

Constructor Summary

Constructors  Constructor Description
Potato()
Creates a default potato.

Method Summary

All Methods Instance Methods Concrete Methods  Modifier and Type Method Description
java.lang.String toString()
Outputs the state of this potato

Methods inherited from class AbstractFood

cook

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

Potato

public Potato()

Creates a default potato. It cooks at any temperature greater than 180 degrees Celsius for more than 30 minutes,
and burns at any temperature greater than 250 degrees Celsius or more than 40 minutes.

Method Detail

toString

public java.lang.String toString()

Outputs the state of this potato

Overrides:
toString in class java.lang.Object
Returns:
If raw (not cooked or burnt): “This is a raw potato.”

If cooked once (not burnt): “This is a baked potato.”

If cooked twice or more (not burnt): “This is a baked potato. It went in the oven twice for some reason. Perhaps the chef is new.”

If burnt: “This is a burnt potato.”

Skip navigation links

Package
Class
Tree
Deprecated
Index
Help

All Classes

JavaScript is disabled on your browser.

Summary: 
Nested | 
Field | 
Constr | 
Method

Detail: 
Field | 
Constr | 
Method

Leave a Reply

Your email address will not be published. Required fields are marked *