文件名称:App
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:595byte
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
编写Java应用程序,自定义类Car,类中有4个变量:字符串name,表示汽车的品牌;字符串color,表示汽车的颜色;double型变量weight,表示汽车的自重;int型变量passenger,表示汽车能搭乘的人数。在应用程序中创建类Car的2个对象,分别为car1(品牌:“本田”;颜色:“黑色”;自重:1500公斤;搭乘的人数:5人),car2(品牌:“奥迪”;颜色:“白色”;自重:1200公斤;搭乘的人数:4人)并显示其信息。-Write a Java application, since the definition of class Car, class four variables: string name, said the car brand string color, represents the color of the car the double variable weight, said the dead weight of the car int variable passenger Indicates the number of persons that can ride in a car. Create an object of class Car 2 application were car1 (brand: " Honda" colors: " black" Weight: 1500 kg take the number of people: 5 people), car2 (brand: Audi colors : " white" weight: 1200 kg take the number of people: 4 people) and display information.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
App.java
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.