140201129-贾杰峰

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了140201129-贾杰峰相关的知识,希望对你有一定的参考价值。

p173-6

class Date{
private String info;
private String identify;
public Date(String info)
{
this.info=info;
this.identify=identify;
}
public String getInfo() {
return info;
}
public void setInfo(String info) {
this.info = info;
}
public String getIdentify() {
return identify;
}
public void setIdentify(String identify) {
this.identify = identify;
}
}
public class SixWork {
public static void main(String[] args) {
Date infu=new Date("Java技术学习班20070326 MLDN 老师");
System.out.println("日期为:"+infu.getInfo().substring(9,17));
String str1="MLDN JAVA";
String newstr1=str1.replace("JAVA", "J2EE");
System.out.println("替换为:"+newstr1);
System.out.println("取出第8个字符为:"+infu.getInfo().charAt(7));
String str2=infu.getInfo().replaceAll("0", "");
System.out.println("清除所有0为:"+str2);
String str3=infu.getInfo().replaceAll(" ", "");
System.out.println("清除所有空格为"+str3);
infu.setIdentify("110225148605922654");
char b[]=infu.getIdentify().toCharArray();
for(int j=b.length-8;j<b.length;j++)
{
System.out.print(+b[j]);
}
}
}

9

class Book{
private String name;
private static int number=0;
private int money;
private static int ceshu;
private String count;
public Book(String name,int number,int money,int ceshu)
{

this.name=name;
this.number=number;
this.money=money;
this.ceshu=ceshu;

this.count=""+number;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public static int getNumber() {
return number;
}
public static void setNumber(int number) {
Book.number = number;
}
public int getMoney() {
return money;
}
public void setMoney(int money) {
this.money = money;
}
public static int getCeshu() {
return ceshu;
}
public static void setCeshu(int ceshu) {
Book.ceshu = ceshu;
}
public String information()
{
return "书名为:"+this.name+"\n编号为:"+this.count+"\n价格为:"+this.money+"\n册数为:"+this.ceshu;
}
}
public class NinethWork {
public static void main(String[] args) {
Book book[]={
new Book("zs",1,12,46),new Book("ls",2,32,80),new Book("tbw",3,42,95)
};
int sum=0;
for(int j=0;j<book.length;j++)
{

sum=sum+book[j].getCeshu();
System.out.println(book[j].information());
}
System.out.print("总册数为:"+sum);
}

}

以上是关于140201129-贾杰峰的主要内容,如果未能解决你的问题,请参考以下文章

嵌入式软件设计第11次实验报告

嵌入式软件设计第12次实验报告

峰识别 峰面积计算 peak detection peak area 源代码 下载

峰识别 峰面积计算 peak detection peak area 源代码 下载

单峰排列

共振峰跟踪通过平均不同分辨率的方法跟踪共振峰,基于时频lpc的频谱图的MATLAB仿真