package huahua;
import java.util.Scanner;
public class test {
static String c="英文";
public static void nianan(){
System.out.println("智能手机的默认语言为"+c);
}
public static void show(String a){
c="中文";
System.out.println("将智能手机的默认语言设置为"+c);
}
public static void main(String[] args) {
phone st=new phone();
nianan();
st.show(c);
}
}
public class card {
String num1="123456";
static String num2="168779";
public void no(){
System.out.println("信用卡4013735633800642的默认密码为"+num1);
}
public static void yes(String num2){
System.out.println("重置信用卡4013735633800642的密码为"+num2);
}
public static void main(String[] args) {
Card st=new Card();
st.no();
st.yes(num2);
}
}
public class gaotie {
final static float PI=145.8f;
public static void main(String[] args) {
int a=2;
float speed=PI*a;
huoche b=new huoche(PI);
gaotie c=new gaotie(speed);
}
}
class huoche{
float PI;
public huoche(float PI){
this.PI=PI;
System.out.println("火车的速度为"+PI+"公里/小时");
}
}
class gaotie{
float speed;
public gaotie(float speed){
this.speed=speed;
System.out.println("高铁的速度为"+speed+"公里/小时");
}
}
package huahua;
import java.util.Date;
public class watch {
public void time(){
Date date=new Date();
String hour=String.format("%tH",date);
String minute=String.format("%tM",date);
System.out.println("当前时间:"+hour+"点"+minute+"分");
}
public static void main(String[] args) {
watch c=new watch();
System.out.println("机械钟的价格为189.99元RMB");
c.time();
System.out.println("石英手表的价格为69.0元RMB");
c.time();
}