import java.util.ArrayList;
import java.util.Arrays;
import java.util.Scanner;
public class Main
{
public static void main(String[] args)
{
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
sc.nextLine();
input[] input = new input[n];//新建一个input数组
ArrayList<String> str = new ArrayList<>();//list数组用来转存用户输入内容到input数组中
for (int i = 0; i < n; i++) //将处理后的用户输入内容整理到list数组,然后输入到input数组,最后初始化list数组
{
str.addAll(Arrays.asList(sc.nextLine().trim().split(" ")));
input[i] = new input(str.get(0), str.get(1), Integer.parseInt(str.get(2)), Integer.parseInt(str.get(3)), Integer.parseInt(str.get(4)));
str.clear();
}
for (input ip :input) {
System.out.println(ip);
}
}
}
class input//创建一个input数组
{
private String No;
private String name;
private int score1;
private int score2;
private int score3;
public input(String No , String name , int score1 , int score2 , int score3) //构造器
{
this.No = No;
this.name = name;
this.score1 = score1;
this.score2 = score2;
this.score3 = score3;
}
public String getNo()
{
return No;
}
public void setNo(String no)
{
this.No = no;
}
public String getName()
{
return name;
}
public void setName(String name)
{
this.name = name;
}
public int getScore1()
{
return score1;
}
public void setScore1(int score1)
{
this.score1 = score1;
}
public int getScore2()
{
return score2;
}
public void setScore2(int score2)
{
this.score2 = score2;
}
public int getScore3()
{
return score3;
}
public void setScore3(int score3)
{
this.score3 = score3;
}
@Override
public String toString()
{
return No + "," + name + "," + score1 + "," + score2 + "," + score3;
}
}
0.0分
0 人评分
C语言训练-求素数问题 (C语言代码)浏览:1509 |
C语言程序设计教程(第三版)课后习题5.4 (C语言代码)浏览:552 |
WU-蓝桥杯算法提高VIP-Quadratic Equation (C++代码)浏览:1808 |
C语言程序设计教程(第三版)课后习题5.5 (C语言代码)浏览:582 |
A+B for Input-Output Practice (V) (C语言代码)浏览:497 |
字符逆序 (C语言代码)浏览:675 |
C语言程序设计教程(第三版)课后习题6.3 (C语言代码)浏览:494 |
C语言程序设计教程(第三版)课后习题6.8 (C语言代码)浏览:653 |
1197求助浏览:667 |
剔除相关数 (C语言代码)浏览:1156 |