tsld056.htm

来自「an excellent java tutorial for the ones 」· HTM 代码 · 共 32 行

HTM
32
字号

<HTML>

<HEAD>
<META HTTP-EQUIV="Context-Type" CONTEXT="text/html;charset=windows-1252">
<meta name="GENERATOR" content="Microsoft Internet Assistant for PowerPoint 97">
 <TITLE>Exercises</TITLE> 
</HEAD>

<BODY     >

 <H1>Exercises</H1> 
 <P><UL>
<LI><H2>Create an abstract aBottle class and three 		subclasses : Beer, Wine and Whiskey. Create a StorageHouse class to contain bottles. Make it empty and create methods for putting and retrieving bottles. Use it from your main method and add several concrete classes. Then create an Exception of the type NoBottleException to be thrown whenever you ask the StorageHouse for a bottle that doesn抰 exist. Catch the exception accordingly and output an error message without interrupting the execution of the program. Finally add the four bottle classes to a bottles package and access them from there. Feel free to improvise to support your decisions.
</H2>
</UL></P>
<P></P> 
<P>
<TABLE>
  <TD HEIGHT=100 WIDTH=100> <A HREF="tsld055.htm">Previous slide</A> </TD>
  <TD HEIGHT=100 WIDTH=100> <A HREF="tsld057.htm">Next slide</A> </TD>
  <TD HEIGHT=100 WIDTH=150> <A HREF="tsld001.htm">Back to first slide</A> </TD>
  <TD HEIGHT=100 WIDTH=150> <A HREF="sld056.htm">View graphic version</A> </TD>
</TABLE>
<BR>
</P>



</Body>
</HTML>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?