By GokiSoft.com| 16:02 19/09/2022|
Java Basic

Java Basic- OOP - Tổng hợp - Quản lý sinh viên - giáo viên bằng java BT989

Câu 1:

Tạo lớp Person chứa thông tin

- Tên

- Giới tính

- Ngày sinh

- Địa chỉ

Với đầy đủ hàm get set, constructor không tham số, constructor đầy đủ tham số

1. Viết phương thức inputInfo(), nhập thông tin Person từ bàn phím

2. Viết phương thức showInfo(), hiển thị tất cả thông tin Person

Câu 2:

Tạo lớp Student thừa kế Person, lưu trữ các thông tin một sinh viên

- Mã sinh viên: chứa 8 kí tự

- Điểm trung bình: từ 0.0 – 10.0

- Email: phải chứa kí tự @ và không tồn tại khoảng trắng

1. Override phương thức inputInfo(), nhập thông tin Student từ bàn phím

2. Override phương thức showInfo(), hiển thị tất cả thông tin Student

3. Viết phương thức xét xem Student có được học bổng không? Điểm trung bình trên 8.0 là được học bổng

Câu 3:

Tạo lớp StudentTest, chứa Main kiểm tra chức năng lớp Student

Tạo Menu chọn như sau

a. Chọn 1: Nhập vào n sinh viên (n là số lượng sinh viên, được nhập từ bàn phím)

b. Chọn 2: Hiển thị thông tin tất cả các sinh viên ra màn hình

c. Chọn 3: Hiển thị sinh viên có điểm trung bình cao nhất và sinh viên có điểm trung bình thấp nhất

d. Chọn 4: Tìm kiếm sinh viên theo mã sinh viên. Nhập vào mã sinh viên. Nếu tồn tại sinh viên

có mã đó thì in ra màn hình thông tin sinh viên. Nếu không tồn tại thì in ra: Không có sinh

viên nào có mã là <giá trị của mã sinh viên>

e. Chọn 5: Hiển thị tất cả các sinh viên theo thứ tự tên trong bảng chữ cái (A->Z)

f. Chọn 6: Hiển thị tất cả các sinh viên được học bổng, và sắp xếp theo thứ tự điểm cao xuống thấp

g. Chọn 7: Thoát

Câu 4:

Tạo lớp Teacher, kế thừa từ Person, lưu trữ thông tin một giảng viên

- Lớp dạy: Lưu lớp mà giảng viên dạy giống như aptech (ví dụ C1011L, C0903H, C1010KV…)

- Lương một giờ dạy

- Số giờ dạy trong tháng

1. Override phương thức inputInfo(), nhập thông tin Teacher từ bàn phím

2. Override phương thức showInfo(), hiển thị tất cả thông tin Teacher

3. Viết phương thức tính lương thực nhận, trả về lương thực nhận theo công thức:

Nếu lớp dạy là lớp buổi sáng và chiều (Giờ G, H, I, K) thì

Lương thực nhận = lương một giờ dạy * số giờ dạy trong tháng;

Nếu lớp dạy là lớp buổi tối (Giờ L, giờ M) thì

Lương thực nhân = lương một giờ dạy * số giờ dạy trong tháng + 200000đ;

Câu 5:

Tạo lớp TeacherTest, chứa hàm Main kiểm tra chức năng của Teacher

Tạo menu lựa chọn như sau:

a. Chọn 1: Nhập vào n giảng viên (n là số lượng sinh viên, được nhập từ bàn phím)

b. Chọn 2: Hiển thị thông tin tất cả các giảng viên ra màn hình

c. Chọn 3: Hiển thị giảng viên có lương cao nhất

d. Chọn 4: Thoát

Liên kết rút gọn:

https://gokisoft.com/989

Bình luận

avatar
GokiSoft.com [Teacher]
2021-07-10 12:26:40


#StudentTest.java


/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package lesson05.bt989;

import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.Scanner;

/**
 *
 * @author Diep.Tran
 */
public class StudentTest {
    static Scanner scan = new Scanner(System.in);
    
    public static void main(String[] args) {
        ArrayList<Student> studentList = new ArrayList<>();
        
        int choose;
        
        do {
            showMenu();
            choose = Integer.parseInt(scan.nextLine());
            switch(choose) {
                case 1:
                    inputStudent(studentList);
                    break;
                case 2:
                    displayStudent(studentList);
                    break;
                case 3:
                    showMinMax(studentList);
                    break;
                case 4:
                    searchStudent(studentList);
                    break;
                case 5:
                    displaySortByName(studentList);
                    break;
                case 6:
                    displayByCerfiticate(studentList);
                    break;
                case 7:
                    System.out.println("Thoat!!!");
                    break;
                default:
                    System.out.println("Nhap lai!!!");
                    break;
            }
        } while(choose != 7);
    }
    
    static void showMenu() {
        System.out.println("1. Nhap thong tin sinh vien");
        System.out.println("2. Hien thi thong tin sinh vien");
        System.out.println("3. Sinh vien diem cao nhat va thap nhat");
        System.out.println("4. Tim kiem theo ma sinh vien");
        System.out.println("5. Hien thi theo ten A-Z");
        System.out.println("6. Hien thi sinh vien duoc hoc bong (cao -> thap)");
        System.out.println("7. Thoat");
        System.out.println("Chon: ");
    }

    static void inputStudent(ArrayList<Student> studentList) {
        System.out.println("Nhap so sinh vien can them: ");
        int n = Integer.parseInt(scan.nextLine());
        
        for (int i = 0; i < n; i++) {
            Student std = new Student();
            std.input();
            
            studentList.add(std);
        }
    }

    static void displayStudent(ArrayList<Student> studentList) {
        for (Student student : studentList) {
            student.display();
        }
    }

    static void showMinMax(ArrayList<Student> studentList) {
        Collections.sort(studentList, new Comparator<Student>() {
            @Override
            public int compare(Student o1, Student o2) {
                if(o1.getMark() > o2.getMark()) {
                    return 1;
                }
                return -1;
            }
        });
        System.out.println("Thong tin sinh vien diem trung binh thap nhat");
        studentList.get(0).display();
        System.out.println("Thong tin sinh vien diem trung binh cao nhat");
        studentList.get(studentList.size() - 1).display();
    }

    static void searchStudent(ArrayList<Student> studentList) {
        System.out.println("Nhap MSV can tim: ");
        String rollnoSearch = scan.nextLine();
        
        boolean isFind = false;
        for (Student student : studentList) {
            if(student.getRollno().equalsIgnoreCase(rollnoSearch)) {
                student.display();
                isFind = true;
                break;
            }
        }
        if(!isFind) {
            System.out.println("Khong tim thay sinh vien vs rollno = " + rollnoSearch);
        }
    }

    static void displaySortByName(ArrayList<Student> studentList) {
        Collections.sort(studentList, new Comparator<Student>() {
            @Override
            public int compare(Student o1, Student o2) {
                return o1.getFullname().compareToIgnoreCase(o2.getFullname());
            }
            
        });
        
        displayStudent(studentList);
    }

    static void displayByCerfiticate(ArrayList<Student> studentList) {
        Collections.sort(studentList, new Comparator<Student>() {
            @Override
            public int compare(Student o1, Student o2) {
                if(o1.getMark() > o2.getMark()) {
                    return -1;
                }
                return 1;
            }
            
        });
        for (Student student : studentList) {
            if(student.checkCerfiticate()) {
                student.display();
            } else {
                break;
            }
        }
    }
}


#Student.java


/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package lesson05.bt989;

import java.util.Scanner;

/**
 *
 * @author Diep.Tran
 */
public class Student extends People{
    String rollno, email;
    float mark;

    public Student() {
    }

    public Student(String rollno, String email, float mark, String fullname, String gender, String birthday, String address) {
        super(fullname, gender, birthday, address);
        this.rollno = rollno;
        this.email = email;
        this.mark = mark;
    }

    public String getRollno() {
        return rollno;
    }

    public void setRollno(String rollno) {
        this.rollno = rollno;
    }

    public String getEmail() {
        return email;
    }

    public boolean setEmail(String email) {
        if(email.contains("@")) {
            this.email = email;
            return true;
        } else {
            System.out.println("Sai format ...");
        }
        return false;
    }

    public float getMark() {
        return mark;
    }

    public boolean setMark(float mark) {
        if(mark >=0 && mark <= 10) {
            this.mark = mark;
            return true;
        } else {
            System.out.println("Yeu cau: mark >= 0 & mark <= 10");
        }
        return false;
    }

    @Override
    public void input() {
        super.input(); //To change body of generated methods, choose Tools | Templates.
        
        Scanner scan = new Scanner(System.in);
        
        System.out.println("Enter rollno: ");
        rollno = scan.nextLine();
        
        System.out.println("Enter email: ");
        while(true) {
            String inputEmail = scan.nextLine();
            if(setEmail(inputEmail)) {
                break;
            }
            System.out.println("Enter email again!!!");
        }
        
        System.out.println("Enter mark: ");
        while(!setMark(Float.parseFloat(scan.nextLine()))) {
            System.out.println("Enter mail again!!!");
        }
    }

    @Override
    public void display() {
        super.display(); //To change body of generated methods, choose Tools | Templates.
        System.out.printf(", rollno: %s, mark: %f, email: %s\n", rollno, mark, email);
    }
    
    public boolean checkCerfiticate() {
        return mark >= 8;
    }
}


#People.java


/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package lesson05.bt989;

import java.util.Scanner;

/**
 *
 * @author Diep.Tran
 */
public class People {
    String fullname, gender, birthday, address;

    public People() {
    }

    public People(String fullname, String gender, String birthday, String address) {
        this.fullname = fullname;
        this.gender = gender;
        this.birthday = birthday;
        this.address = address;
    }

    public String getFullname() {
        return fullname;
    }

    public void setFullname(String fullname) {
        this.fullname = fullname;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public String getBirthday() {
        return birthday;
    }

    public void setBirthday(String birthday) {
        this.birthday = birthday;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }
    
    public void input() {
        Scanner scan = new Scanner(System.in);
        
        System.out.println("Enter fullname: ");
        fullname = scan.nextLine();
        
        System.out.println("Enter gender: ");
        gender = scan.nextLine();
        
        System.out.println("Enter birthday: ");
        birthday = scan.nextLine();
        
        System.out.println("Enter address: ");
        address = scan.nextLine();
    }
    
    public void display() {
        System.out.printf("\nFullname: %s, Gender: %s, Birthday: %s, Address: %s", fullname, gender, birthday, address);
    }
}


avatar
Đào Mạnh Dũng [C2010L]
2021-07-08 14:50:24


#MyLib.java


/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package oop;
import java.io.*;
import java.util.Scanner;
/**
 *
 * @author inclu
 */
class MyLib {
    private final static String FILE_URL = "menu.txt";
    
    static String choose;
    static int chooses;
    public static int menu() throws IOException, InterruptedException {
        
        cls();
        
        File file = new File(FILE_URL);
        InputStream inputStream = new FileInputStream(file);
        InputStreamReader inputStreamReader = new InputStreamReader(inputStream);
        BufferedReader reader = new BufferedReader(inputStreamReader);
 
        String line = "";
        while((line = reader.readLine()) != null){
            System.out.println(line);
        }
       
        
        Scanner scan = new Scanner(System.in);    
            
        choose = scan.next();
            
try {
        chooses = Integer.parseInt(choose);
} catch (NumberFormatException e) {
        System.out.println("ban phai nhap mot so");
}    
            
        return chooses;
    }
 public static void cls()
{
	try
	{	
		new ProcessBuilder("cmd","/c","cls").inheritIO().start().waitFor();
	}catch(Exception E)
		{
			System.out.println(E);
		}
}
	
}


#Person.java


/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package oop;

import java.util.Scanner;

/**
 *
 * @author inclu
 */
public class Person  {
    
    public static Scanner scan = new Scanner(System.in);
    
    String name,gender,Birthday,Address;

    public Person() {
    }

    public Person(String name, String gender, String Birthday, String Address) {
        this.name = name;
        this.gender = gender;
        this.Birthday = Birthday;
        this.Address = Address;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public String getBirthday() {
        return Birthday;
    }

    public void setBirthday(String Birthday) {
        this.Birthday = Birthday;
    }

    public String getAddress() {
        return Address;
    }

    public void setAddress(String Address) {
        this.Address = Address;
    }
    
    public void inputInfo() {
        
        name = scan.nextLine();
        gender = scan.nextLine();
        Birthday = scan.nextLine();
        Address = scan.nextLine();
    }
    
    public void showInfo() {
         
        System.out.println(name); 
        System.out.println(gender); 
        System.out.println(Birthday); 
        System.out.println(Address); 
        
    }
}


#Sortbyroll.java


/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package oop;

import java.util.Comparator;

/**
 *
 * @author inclu
 */
public abstract class Sortbyroll implements Comparator<Student>
{
    // Used for sorting in ascending order of
    // roll number
    public int compare(Student a, Student b)
    {
        return (int) (a.point - b.point);
    }
}


#Student.java


/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package oop;

/**
 *
 * @author inclu
 */
public class Student extends Person{
    String rollNo,email;
    float point;

    public Student() {
    }

    public Student(String rollNo, String email, float point, String name, String gender, String Birthday, String Address) {
        super(name, gender, Birthday, Address);
        this.rollNo = rollNo;
        this.email = email;
        this.point = point;
    }

    public String getRollNo() {
        return rollNo;
    }

    public void setRollNo(String rollNo) {
        if (rollNo.length()!=8) {
            this.rollNo = rollNo;
        } else {
            System.out.println("nhap sai");
        }
        
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        
        if (!email.contains(" ")&&email.contains("@")) {
            this.email = email;
        } else {
            System.out.println("nhap sai");
        }
        
        
    }

    public float getPoint() {
        return point;
    }

    public void setPoint(float point) {
        
        if(point>=0&&point<=10){
        this.point = point;
        } else {
            System.out.println("nhap sai");
        }
            
            
    }

    @Override
    public void showInfo() {
        super.showInfo();
        
        rollNo = scan.nextLine();
        email = scan.nextLine();
        point = scan.nextFloat();
        
    }

    @Override
    public void inputInfo() {
        super.inputInfo(); 
        
        System.out.println(rollNo); 
        System.out.println(email); 
        System.out.println(point); 
    }
    
    public void checkHB(){
        if (point>=8.0) {
            System.out.println("co hoc bong");
        } else {
            System.out.println("khong co hoc bong");
        }
    }
       
    
}


#StudentTest.java


/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package oop;

import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;

/**
 *
 * @author inclu
 */
public class StudentTest {
    
        public static Scanner scan = new Scanner(System.in);
        
        public static ArrayList<Student> studentList = new ArrayList<>();
    
    public static void main(String[] args) throws IOException, InterruptedException {
        while(true){
            switch(MyLib.menu()){
            
            case 1 -> { 
                System.out.println("Nhập vào n ");
                    int n = scan.nextInt();
                System.out.println("Nhập vào "+n+" sinh viên ");
                
                Student student = new Student();
                    
                    for (int i = 0; i < n; i++) {
                        student.inputInfo();
                        studentList.add(student);
                }
            }
            case 2 -> { 
                  for (int i = 0; i < studentList.size(); i++) {
                      
                        studentList.get(i).showInfo();
                    
                    }
                    
            }
            case 3 -> { 
                Collections.sort(studentList);
            }
            case 4 -> { 
                System.out.println("nhap ma : ");
                String code = scan.next();
                for (int i = 0; i < studentList.size(); i++) {
                     if (code==studentList.get(i).rollNo) {
                        studentList.get(i).showInfo();
                    }
                }
            }
            case 5 -> { 
            }
            case 6 -> { 
            }
            case 7 -> { 
            }
            
            default -> System.out.println("Lua chon ko hop le");
        }
        }
    }
    
}


#menu.txt


a. Chọn 1: Nhập vào n sinh viên (n là số lượng sinh viên, được nhập từ bàn phím)

b. Chọn 2: Hiển thị thông tin tất cả các sinh viên ra màn hình

c. Chọn 3: Hiển thị sinh viên có điểm trung bình cao nhất và sinh viên có điểm trung bình thấp nhất

d. Chọn 4: Tìm kiếm sinh viên theo mã sinh viên. Nhập vào mã sinh viên. Nếu tồn tại sinh viên

có mã đó thì in ra màn hình thông tin sinh viên. Nếu không tồn tại thì in ra: Không có sinh

viên nào có mã là <giá trị của mã sinh viên>

e. Chọn 5: Hiển thị tất cả các sinh viên theo thứ tự tên trong bảng chữ cái (A->Z)

f. Chọn 6: Hiển thị tất cả các sinh viên được học bổng, và sắp xếp theo thứ tự điểm cao xuống thấp

g. Chọn 7: Thoát


avatar
Đào Mạnh Dũng [C2010L]
2021-07-08 13:45:03



/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package oop;

import java.util.Scanner;

/**
 *
 * @author inclu
 */
public class Person  {
    
    public static Scanner scan = new Scanner(System.in);
    
    String name,gender,Birthday,Address;

    public Person() {
    }

    public Person(String name, String gender, String Birthday, String Address) {
        this.name = name;
        this.gender = gender;
        this.Birthday = Birthday;
        this.Address = Address;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public String getBirthday() {
        return Birthday;
    }

    public void setBirthday(String Birthday) {
        this.Birthday = Birthday;
    }

    public String getAddress() {
        return Address;
    }

    public void setAddress(String Address) {
        this.Address = Address;
    }
    
    public void inputInfo() {
        
        name = scan.nextLine();
        gender = scan.nextLine();
        Birthday = scan.nextLine();
        Address = scan.nextLine();
    }
    
    public void showInfo() {
         
        System.out.println(name); 
        System.out.println(gender); 
        System.out.println(Birthday); 
        System.out.println(Address); 
        
    }
}


avatar
Nguyễn Tiến Đạt [T2008A]
2021-03-08 15:50:29


#cTivi.java


/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package lesson9.DieuKhienTiVi;



/**
 *
 * @author MyPC
 */
public class cTivi {
    private String[] channelList;
    private boolean isOn;
    private String currentChannel;

    public cTivi() {
        isOn = false;
        channelList = new String[3];
        channelList[0] = "VTV1";
        channelList[1] = "VTV2";
        channelList[2] = "VTV3";
        currentChannel = channelList[0];
    }

    public cTivi(String[] channelList) {
        this.channelList = channelList;
        this.isOn = false;
        this.currentChannel = channelList[0];
    }

    

    
    
    public String searchNextChannel(boolean isForward){
        if(isForward == true){
            for (int i = 0; i < channelList.length; i++) {
                if(channelList[i].equalsIgnoreCase(currentChannel)){
                    if( i != channelList.length - 1 ) return channelList[i+1];
                    else return channelList[0];
                }
            }
        }else{
            for (int i = 0; i < channelList.length; i++) {
                if(channelList[i].equalsIgnoreCase(currentChannel)){
                    if( i != 0 ) return channelList[i-1];
                    else return channelList[channelList.length-1];
                }
            }
        }
        return null;
    }
    
    public void On(){
        isOn = true;
        System.out.println("---Tivi ON---");
    }
    
    public void Off(){
        isOn = false;
        System.out.println("---Tivi OFF---");
    }
    
    public void Switch(){
        if(isOn == false){
            isOn = true;
            System.out.println("---Tivi ON---");
        }else{
            isOn = false;
            System.out.println("---Tivi OFF---");
        }
    }
    
    public void Switch(String channel){
        if(isOn == false){
            System.out.println("Tivi chua bat!!");
        }else{
            int check = 0;
            for (String string : channelList) {
                if(string.equalsIgnoreCase(channel)){
                    check++;
                    System.out.println("Da tim thay kenh!!");
                    currentChannel = string;
                    break;
                }
            }
            if(check == 0) System.out.println("Khong tim thay kenh!!");
        }
    }
    
    public void nextChannel(){
        if(isOn == true){
            for (int i = 0; i < channelList.length; i++) {
                if(channelList[i].equalsIgnoreCase(currentChannel)){
                    if( i != channelList.length - 1 )  currentChannel = channelList[i+1];
                    else currentChannel = channelList[0]; 
                    break;
                }
            }
            System.out.println(currentChannel);
        }else System.out.println("Tivi chua bat!!");
    }
    
    public void previousChannel(){
        if(isOn == true){
            for (int i = 0; i < channelList.length; i++) {
                if(channelList[i].equalsIgnoreCase(currentChannel)){
                    if( i != 0 )  currentChannel = channelList[i-1];
                    else currentChannel = channelList[channelList.length-1]; 
                    break;
                }
            }
            System.out.println(currentChannel);
        }else System.out.println("Tivi chua bat!!");
    }
    
    public void Show(){
        if(isOn == true){
            System.out.println("---Tivi is On at channel: " + currentChannel + "---");
        }else{
            System.out.println("---Tivi now OFF!---");
        }
    }
}


#Program.java


/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package lesson9.DieuKhienTiVi;

import java.util.Scanner;

/**
 *
 * @author MyPC
 */
public class Program {
    public static void main(String[] args) {
        int choose;
        cTivi tivi;
        Scanner scan = new Scanner(System.in);
        System.out.println("Lua chon phuong thuc khoi tao tivi:");
        System.out.println("1.Mac dinh");
        System.out.println("2.Tu chon kenh");
        choose = Integer.parseInt(scan.nextLine());
        if(choose == 1){
            tivi = new cTivi();
            System.out.println("Da khoi tao mac dinh!!");
        }else{
            System.out.println("Nhap so kenh muon them vao:");
            int select = Integer.parseInt(scan.nextLine());
            String[] list = new String[select];
            int count = 0;
            while(true){
                System.out.println("Nhap kenh:");
                String kenh = scan.nextLine();
                list[count++] = kenh;
                select--;
                if(select == 0) break;
            }
            tivi = new cTivi(list);
            System.out.println("Da khoi tao tu chon kenh!!");
        }
        do{
            showMenu();
            System.out.println("Lua chon chuong trinh:");
            choose = Integer.parseInt(scan.nextLine());
            switch(choose){
                case 1:
                    tivi.Switch();
                    break;
                case 2:
                    System.out.println("Nhap kenh:");
                    String kenh = scan.nextLine();
                    tivi.Switch(kenh);
                    break;
                case 3:
                    tivi.On();
                    break;
                case 4:
                    tivi.Off();
                    break;
                case 5:
                    tivi.nextChannel();
                    break;
                case 6:
                    tivi.previousChannel();
                    break;
                case 7:
                    tivi.Show();
                    break;
                case 8:
                    System.out.println("Ket thuc chuong trinh!!");
                    break;
                default:
                    System.out.println("Nhap sai!!");
                    break;
            }
        }while(choose != 8);
    }
    static void showMenu(){
        System.out.println("1.Chuyen trang thai");
        System.out.println("2.Chuyen trang thai kem theo kenh");
        System.out.println("3.Bat tivi");
        System.out.println("4.Tat tivi");
        System.out.println("5.Chuyen kenh tiep");
        System.out.println("6.Chuyen kenh truoc");
        System.out.println("7.Xem thong tin tivi");
        System.out.println("8.Ket thuc");
    }
}


avatar
vuong huu phu [T2008A]
2021-03-02 07:44:50



/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package javaapplication20;

import java.util.ArrayList;
import java.util.Scanner;

/**
 *
 * @author Admin
 */
public class TeacherTest {

    public static void main(String[] args) {
        ArrayList<Teacher> teacher = new ArrayList<>();
        Scanner scan = new Scanner(System.in);
int Lua_chon;
        do {
            menu();
            
            System.out.println("Nhap su lua chon:");
            Lua_chon = scan.nextInt();
            switch (Lua_chon) {
                case 1:
                    int n;
                    System.out.println("Nhap so luong giang vien:");
                    n = scan.nextInt();
                    for (int i = 0; i < n; i++) {
                        Teacher tc = new Teacher();
                        tc.inputInfo();
                        teacher.add(tc);
                    }
                    break;
                case 2:
                 for (int i = 0; i < teacher.size(); i++) {
                 teacher.get(i).showInfo();
                 }
                    break;
                case 3:
float max = teacher.get(0).tinh_luong();
                    for (int i = 0; i < teacher.size(); i++) {
                        if (teacher.get(i).tinh_luong() > max){
                        max = teacher.get(i).tinh_luong();
                        }
                    }
                    for (int i = 0; i < teacher.size(); i++) {
                        if (teacher.get(i).tinh_luong() == max){
                        teacher.get(i).showInfo();
                        } 
                    }
                    break;
                case 4:
                    System.out.println("thoat!");
                    break;
            }

        } while (Lua_chon != 5);
    }

    public static void menu() {
        System.out.println(" 1 Nhap n giang vien:");
        System.out.println(" 2 Hien thi tat ca cac giang vien:");
        System.out.println(" 3 Hien thi giang vien co luong cao nhat");
        System.out.println(" 4 thoat!!!");
        System.out.println();
    }
}


avatar
vuong huu phu [T2008A]
2021-03-02 07:44:37



/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package javaapplication20;

import java.util.Scanner;

/**
 *
 * @author Admin
 */
public class Teacher extends Person {

    String Lop_hoc;
    float Luong;
    float So_gio_day;

    public Teacher() {
    }

    public Teacher(String Lop_hoc, float Luong, float So_gio_day) {
        this.Lop_hoc = Lop_hoc;
        this.Luong = Luong;
        this.So_gio_day = So_gio_day;
    }

    public String getLop_hoc() {
        return Lop_hoc;
    }

    public void setLop_hoc(String Lop_hoc) {
        this.Lop_hoc = Lop_hoc;
    }

    public float getLuong() {
        return Luong;
    }

    public void setLuong(float Luong) {
        this.Luong = Luong;
    }

    public float getSo_gio_day() {
        return So_gio_day;
    }

    public void setSo_gio_day(float So_gio_day) {
        this.So_gio_day = So_gio_day;
    }

    @Override
    public void showInfo() {
        System.out.println(this);
    }

    @Override
    public String toString() {
        return super.toString() + " Lop_hoc=" + Lop_hoc + ", Luong=" + Luong + ", So_gio_day=" + So_gio_day;
    }

    @Override
    public void inputInfo() {
        Scanner sc = new Scanner(System.in);
        super.inputInfo();
        System.out.println("Nhap ten lop hoc:");
        Lop_hoc = sc.nextLine();
        System.out.println("Nhap Luong:");
        Luong = sc.nextFloat();
        System.out.println("Nhap so gio day:");
        So_gio_day = sc.nextInt();
        System.out.println();
    }

    public float tinh_luong() {
        float bd = 200000;
        if (Lop_hoc.contains("L") || Lop_hoc.contains("M")) {
            float t = ((Luong * So_gio_day) + 200000);
            return t;
        } else {
            float t = Luong * So_gio_day;
            return t;
        }
    }
}


avatar
vuong huu phu [T2008A]
2021-03-02 07:44:18



/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package javaapplication20;

import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.Scanner;

/**
 *
 * @author Admin
 */
public class StudentTest {

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        ArrayList<Student> std = new ArrayList<>();
        ArrayList<Student> std_hb = new ArrayList<>();
        int Lua_chon;
        do {

            menu();
            System.out.println("Nhap su lua chon");
            Lua_chon = scan.nextInt();
            switch (Lua_chon) {
                case 1:
                    int n;
                    System.out.println("Nhap so luong hoc sinh ");
                    n = scan.nextInt();
                    for (int i = 0; i < n; i++) {
                        Student std_a = new Student();
                        std_a.inputInfo();
                        std.add(std_a);
                    }
                    break;
                case 2:
                    for (int i = 0; i < std.size(); i++) {
                        std.get(i).showInfo();
                    }
                    break;
                case 3:
                    float max = std.get(0).Diem_tb,
                     min = std.get(0).Diem_tb;
                    for (int i = 0; i < std.size(); i++) {
                        if (std.get(i).Diem_tb > max) {
                            max = std.get(i).Diem_tb;
                        }
                        if (std.get(i).Diem_tb < min) {
                            min = std.get(i).Diem_tb;
                        }
                    }
                    for (int i = 0; i < std.size(); i++) {
                        if (std.get(i).Diem_tb == max) {
                            System.out.println("Hoc sinh co diem trung binh cao nhat la ");
                            std.get(i).showInfo();
                        }
                    }
                    for (int i = 0; i < std.size(); i++) {
                        if (std.get(i).Diem_tb == min) {
                            System.out.println("Hoc sinh co diem trung binh thap nhat la ");
                            std.get(i).showInfo();
                        }
                    }
                    break;
                case 4:
                    tim_kiem(std);
                    break;
                case 5:
                    Collections.sort(std, new Comparator<Student>() {
                        @Override
                        public int compare(Student o1, Student o2) {
                            if (o1.getTen().compareToIgnoreCase(o2.getTen()) > 0) {
                                return 1;
                            } else {
                                return -1;
                            }
                        }

                    });
                    for (int i = 0; i < std.size(); i++) {
                        std.get(i).showInfo();
                    }
                    break;
             
                case 6:
                  Collections.sort(std, new Comparator<Student>(){
                @Override
                public int compare(Student o1, Student o2) {
                    if (o1.getDiem_tb() <= o2.getDiem_tb()){
                    return 1;
                    }else{
                    return -1;
                    }
                }
                  });
                    for (int i = 0; i < std.size(); i++) {
                        if (std.get(i).kiem_tra_hb()){
                        std.get(i).showInfo();
                        }
                    }
                    break;
            }
        } while (Lua_chon != 7);
    }

    public static void menu() {
        System.out.println(" 1 Nhap vao n sinh vien");
        System.out.println(" 2 Hien thi tat ca cac sinh vien ra man hinh");
        System.out.println(" 3 Hien thi sinh vien co diem trung binh cao nhat va sinh vien co diem trung binh thap nhat");
        System.out.println(" 4 Tim kiem sinh vien theo ma sinh vien");
        System.out.println(" 5 Hien thi tat ca sinh vien theo thu tu tu (A-Z)");
        System.out.println(" 6 Hien thi tat ca sinh vien duoc hoc bong va hien thi theo thu tu tu cao den thap");
        System.out.println(" 7 Thoat!!!");
        System.out.println();
    }

    public static void tim_kiem(ArrayList<Student> std) {
        Scanner scan = new Scanner(System.in);
        System.out.println("Nhap ma sinh vien can tim");
        String masv = scan.nextLine();
        int kt = 0;
        for (Student student : std) {
            if (student.Ma_sv.equalsIgnoreCase(masv)) {
                student.showInfo();
                kt++;
            }
        }
        if (kt == 0) {
            System.out.println("Khong co sinh vien nao ");
        }

    }
}


avatar
vuong huu phu [T2008A]
2021-03-02 07:44:01



/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package javaapplication20;

import java.util.Scanner;

/**
 *
 * @author Admin
 */
public class Student extends Person {

    String Ma_sv;
    float Diem_tb;
    String Email;

    @Override
    public void showInfo() {
        System.out.println(this);
    }

    public Student() {
    }

    public String getMa_sv() {
        return Ma_sv;
    }

    public void setMa_sv(String Ma_sv) {
        this.Ma_sv = Ma_sv;
    }

    public float getDiem_tb() {
        return Diem_tb;
    }

    public void setDiem_tb(float Diem_tb) {
        this.Diem_tb = Diem_tb;
    }

    public String getEmail() {
        return Email;
    }

    public void setEmail(String Email) {
        this.Email = Email;
    }

    public Student(String Ma_sv, float Diem_tb, String Email) {
        this.Ma_sv = Ma_sv;
        this.Diem_tb = Diem_tb;
        this.Email = Email;
    }

    @Override
    public void inputInfo() {
        Scanner sc = new Scanner(System.in);
        super.inputInfo();
        System.out.println("Nhap ma sinh vien");
        Ma_sv = scan.nextLine();
        if (Ma_sv.length() > 8) {
            System.out.println("Nhap lai ma sinh vien:");
            Ma_sv = scan.nextLine();
        }
        System.out.println("Nhap Diem trung binh");
        Diem_tb = Float.parseFloat(scan.nextLine());
        if (Diem_tb < 0.0 || Diem_tb > 10.0) {
            System.out.println("Nhap Diem trung binh:");
            Diem_tb = Float.parseFloat(scan.nextLine());
        }
        System.out.println("Nhap Email");
        Email = scan.nextLine();
        if (Email.contains("@")) {
            System.out.println("Nhap lai Email:");
            Email = scan.nextLine();
        }
    }

    @Override
    public String toString() {
        return super.toString() + ", Ma_sv=" + Ma_sv + ", Diem_tb=" + Diem_tb + ", Email=" + Email;
    }

    public boolean kiem_tra_hb() {
        if (Diem_tb >= 8.0) {
            return true;
        } else {
            return false;
        }
    }
   
}


avatar
vuong huu phu [T2008A]
2021-03-02 07:43:46



/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package javaapplication20;

import java.util.Scanner;

/**
 *
 * @author Admin
 */
public class Person {
String Ten,Gioi_tinh,Ngay_sinh,Dia_chi;
Scanner scan = new Scanner(System.in);
    public Person() {
    }

    public Person(String Ten, String Gioi_tinh, String Ngay_sinh, String Dia_chi) {
        this.Ten = Ten;
        this.Gioi_tinh = Gioi_tinh;
        this.Ngay_sinh = Ngay_sinh;
        this.Dia_chi = Dia_chi;
    }

    public String getTen() {
        return Ten;
    }

    public void setTen(String Ten) {
        this.Ten = Ten;
    }

    public String getGioi_tinh() {
        return Gioi_tinh;
    }

    public void setGioi_tinh(String Gioi_tinh) {
        this.Gioi_tinh = Gioi_tinh;
    }

    public String getNgay_sinh() {
        return Ngay_sinh;
    }

    public void setNgay_sinh(String Ngay_sinh) {
        this.Ngay_sinh = Ngay_sinh;
    }

    public String getDia_chi() {
        return Dia_chi;
    }

    public void setDia_chi(String Dia_chi) {
        this.Dia_chi = Dia_chi;
    }

public void inputInfo(){
System.out.println("Nhap ten:");
Ten = scan.nextLine();
System.out.println("Nhap gioi tinh");
Gioi_tinh = scan.nextLine();
System.out.println("Nhap ngay sinh");
Ngay_sinh = scan.nextLine();
System.out.println("Nhap dia chi");
Dia_chi = scan.nextLine();
System.out.println();
}
public void showInfo(){
System.out.println(toString());
}

    @Override
    public String toString() {
        return "Ten=" + Ten + ", Gioi_tinh=" + Gioi_tinh + ", Ngay_sinh=" + Ngay_sinh + ", Dia_chi=" + Dia_chi;
    }

}


avatar
đỗ đình vang [JavaFree]
2020-05-02 04:03:22



import java.util.Scanner;

public class Person {
	public Scanner sc =new Scanner(System.in);
	public Person() {
		super();
		// TODO Auto-generated constructor stub
	}
	public Person(String name, String gender, String birthday, String address) {
		super();
		this.name = name;
		this.gender = gender;
		this.birthday = birthday;
		this.address = address;
	}
	String name;
	String gender;
	String birthday;
	String address;
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getGender() {
		return gender;
	}
	public void setGender(String gender) {
		this.gender = gender;
	}
	public String getBirthday() {
		return birthday;
	}
	public void setBirthday(String birthday) {
		this.birthday = birthday;
	}
	public String getAddress() {
		return address;
	}
	public void setAddress(String address) {
		this.address = address;
	}
	@Override
	public String toString() {
		return "Thongtin:name=" + name + ", gender=" + gender + ", birthday=" + birthday + ", address=" + address + ",";
	}
	//nhapthongtin
	public void inputInfo() {
		System.out.println(" nhap ten");
		name=sc.nextLine();
		System.out.println(" nhap gioi tinh ");
		gender=sc.nextLine();
		System.out.println(" nhap ngay sinh");
		birthday=sc.nextLine();
		System.out.println(" nhap dia chi");
		address =sc.nextLine();
	}
	//hien thi thong tin
	public void showInfo() {
		System.out.println(toString());
	}
}


















import java.util.ArrayList;

public class Student extends Person {
		public Student() {
		super();
		// TODO Auto-generated constructor stub
	}
	public Student(String name, String gender, String birthday, String address) {
		super(name, gender, birthday, address);
		// TODO Auto-generated constructor stub
	}
		public Student(String msv, double gPA, String email) {
		super();
		this.msv = msv;
		GPA = gPA;
		this.email = email;
	}
		String msv;
		double GPA;
		String email;
		public String getMsv() {
			return msv;
		}
		public void setMsv(String msv) {
			this.msv = msv;
		}
		public double getGPA() {
			return GPA;
		}
		public void setGPA(double gPA) {
			GPA = gPA;
		}
		public String getEmail() {
			return email;
		}
		public void setEmail(String email) {
			this.email = email;
		}
		//nhap thong tin
		public void inputInfo() {
			super.inputInfo();
			System.out.println(" nhap ma sinh vien");
			 msv=sc.nextLine();
			while(msv.length()!=8&&!msv.contains(" ")) {
				System.err.println(" vui long nhap lai(msv phai du 8 ki tu va khong chua khoang trang)");
				msv=sc.nextLine();
			}
			System.out.println(" nhap diem trung binh(GPA)");
			GPA=Double.parseDouble(sc.nextLine());
			while(GPA>10.0||GPA<0.0) {
				System.err.println(" vui long nhap lai(diem trung binh phai thuoc trong khoang 0.0 – 10.0");
				GPA=Double.parseDouble(sc.nextLine());
			}
			System.out.println(" nhap email");
			email=sc.nextLine();
			while(!email.contains("@")||email.contains(" ")) {
				System.err.println(" vui long nhap lai(email nhap vao phai chua ki tu @ va khong chua khaong trang)");
				email=sc.nextLine();
			}
			
		}
		// hien thi thong tin sinh vien
		public void showInfo() {
			System.out.println(toString());
			
		}
		// kiem tra sinh vien co duoc hoc bong
		public boolean check(ArrayList<Student> student,int count) {
					if(student.get(count).getGPA()>=8.0) {
						return true;
					}
				
				return false;
		}
		
		
		@Override
		public String toString() {
			return super.toString()+" msv=" + msv + ", GPA=" + GPA + ", email=" + email ;
		}
}














import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.Scanner;

public class StudentTest {
public static  Scanner scan =new Scanner(System.in);
	public static void main(String[] args) {
		ArrayList<Student>student=new ArrayList<>();
		Student student2=new Student();
		int n;
		// TODO Auto-generated method stub
		do {
			showMenu();
			System.out.println(" nhap chuc nang");
			n=Integer.parseInt(scan.nextLine());
			switch(n) {
			case 1:
				System.out.println(" nhap so sinh vien can them");
				int m=Integer.parseInt(scan.nextLine());
				for(int i=0; i<m; i++) {
					Student student1= new Student();
					student1.inputInfo();
					student.add(student1);
				}
				break;
			case 2:
				System.out.println("Danh sach thong tin sinh vien");
				for(int i=0; i<student.size(); i++) {
					student.get(i).showInfo();
				}
				break;
			case 3:
				search(student);
				break;
			case 4:
				System.out.println(" thong tin sinh vien ban can tim: ");
				search1(student);
				break;
			case 5:
				System.out.println(" danh sac thong tin sinh vien theo bang chu cai");
				outPut(student);
				break;
			case 6:
				int count=0;
				ArrayList<Student>studenttwo= new ArrayList<>();/* mang danh sach sinh vien
				duoc hoc bong*/
				System.out.println("  Danh Thong tin sinh vien duoc hoc bong");
				for(int i=0; i<student.size();i++) {
					if(student2.check(student, i)) {
						count++;
						studenttwo.add(student.get(i));
					}
				}
				if(count==0) {
					System.err.println(" Khong co sinh vien nao duoc hoc bong");
				}
				
				Collections.sort(studenttwo, new Comparator<Student>() {
					public int compare(Student o1, Student o2) {
						if(o1.getGPA()<o2.getGPA()) {
							return 1;
						}
						else {
							return -1;
						}
					}
					
				});
				for(int i=0; i<studenttwo.size(); i++) {
					studenttwo.get(i).showInfo();
					
				}
				
				 break;
			case 7:
				System.out.println(" Exit!!");
				break;
				default:
					System.err.println(" hay nhap lai");
			}
			
			
		}while(n!=7);

	}
	//Danh sach chon
	public static void  showMenu() {
		System.out.println("1.Them sinh vien");
		System.out.println("2.Hien thi thong tin tat ca sinh vien");
		System.out.println("3.hien thi sinh vien co diem trung binh ca nhat "
				+ "va sinh vien co diem trung binh thap nhat");
		System.out.println("4.Tim kiem sinh vien theo ma sinh vien");
		System.out.println("5.Hien thi thong tin sinh vien theo bang chu cai");
		System.out.println("6.Hien thi sinh vien duoc hoc bong va"
				+ "sap xep tu cao xuong thap");
		System.out.println("7.Thoat chuong trinh");
	}
	// tim sinh vien co diem GPA cao nhat va thap nhat
	public static void search(ArrayList<Student> studentone) {
				double temp=0.0;
				double GPAmax,GPAmin;
				// tim kiem sinh vien co GPA cao nhat
				for(int i=0; i< studentone.size(); i++) {
					if(studentone.get(i).getGPA()>temp) {
						temp=studentone.get(i).getGPA();
					}
				}
				GPAmax=temp;
				for(int i=0; i<studentone.size(); i++) {
					if(studentone.get(i).getGPA()==GPAmax) {
						studentone.get(i).showInfo();
					}
				}
				// tim kiem sinh vien co GPA thap nhat
				for(int i=0; i< studentone.size(); i++) {
					if(studentone.get(i).getGPA()<temp) {
						temp=studentone.get(i).getGPA();
					}
				}
				GPAmin=temp;
				for(int i=0; i<studentone.size(); i++) {
					if(studentone.get(i).getGPA()==GPAmin) {
						studentone.get(i).showInfo();
					}
				}
			}
	// tim kiem sinh vien theo ma sinh vien
	public static void search1(ArrayList<Student> studentone) {
		System.out.println(" nhap ma sinh vien can tim");
		String msv=scan.nextLine();
		for(int i=0; i<studentone.size(); i++) {
			if(studentone.get(i).getMsv().equalsIgnoreCase(msv)) {
				studentone.get(i).showInfo();
			}
		}
	}
		// hien thi thong sinh vien thao bang chu cai
	public static void outPut(ArrayList<Student>studentone) {
		Collections.sort(studentone, new Comparator<Student>() {

			@Override
			public int compare(Student o1, Student o2) {
				if(o1.getName().compareToIgnoreCase(o2.getName())>0) {
					return 1;
				}
				else {
					return -1;
				}
			}
		});
		for(int i=0; i<studentone.size(); i++) {
			studentone.get(i).showInfo();
		}
	}
	

}












import java.util.ArrayList;

public class Teacher extends Person{
	String classes;
	double salary;
	int hours;
	double pay;
	public Teacher(String classes, double salary, int hours) {
		super();
		this.classes = classes;
		this.salary = salary;
		this.hours = hours;
	}
	public Teacher() {
		super();
		// TODO Auto-generated constructor stub
	}
	public String getClasses() {
		return classes;
	}
	public void setClasses(String classes) {
		this.classes = classes;
	}
	public double getSalary() {
		return salary;
	}
	public void setSalary(double salary) {
		this.salary = salary;
	}
	public int getHours() {
		return hours;
	}
	public void setHours(int hours) {
		this.hours = hours;
	}
	public Double getPay() {
		return pay;
	}
	public void setClasses(Double pay) {
		this.pay = pay;
	}
	// nhap thong tim giao vien
	public void inputInfo() {
		super.inputInfo();
		System.out.println(" lop day");
		classes=sc.nextLine();
		System.out.println(" luong 1 gio day");
		salary=Double.parseDouble(sc.nextLine());
		System.out.println("so gio dau trong 1 thang");
		hours=Integer.parseInt(sc.nextLine());
	}
	public void showInfo() {
		System.out.println(toString());
		
	}
	public String toString() {
		return super.toString()+ " Lop day="+classes+",luong 1 gio day="+salary+
				",so gio day trong 1 thang= "+hours+",Luong duoc tra= "+pay;
	}
	//  tinh luong
	public double pay(ArrayList<Teacher>teacher, int count) {
		if(teacher.get(count).getClasses().contains("s")||getClasses().contains("ch") ) {
			pay=salary*hours;
			return pay;
		}
		if(teacher.get(count).getClasses().contains("t")) {
			pay=salary*hours+200000;
			return pay;
		}
		return 0;
	}
}












import java.util.ArrayList;
import java.util.Scanner;

public class TeacherTest {
	public static void main(String []agrs) {
		Teacher teacherone=new Teacher();
		Scanner scan=new Scanner(System.in);
		ArrayList<Teacher>teacher= new ArrayList<>();
		int n;
		do {
			System.out.println(" chon chuc nang");
			showMenu();
			 n=Integer.parseInt(scan.nextLine());
			 switch(n) {
			 case 1:
				 System.out.println(" Nhap so giang  vien");
				 int gv=Integer.parseInt(scan.nextLine());
				 for(int i=0; i<gv; i++) {
					 teacherone.inputInfo();
					 teacher.add(teacherone);
					 teacherone.pay(teacher, i);
				 }
				 break;
			 case 2:
				 System.out.println(" danh sach thong tin giang vien");
				for (int i = 0; i < teacher.size(); i++) {
					teacher.get(i).showInfo();
				}
				 break;
			 case 3:
				 System.out.println(" Thong tin giang vien co luong cao nhat");
				 double temp=0;
				 for(int i=0; i<teacher.size();i++) {
					 if(teacher.get(i).getPay()>temp) {
						 temp=teacher.get(i).getPay();
					 }
				 }
				 for (Teacher teacher2 : teacher) {
					 if(teacher2.getPay()==temp) {
						 teacher2.showInfo();
					 }
				}
				 break;
			 case 4:
				 System.out.println("Exit!!!");
				 break;
				 default:
					 System.err.println(" vui long nhap lai");
			 }
			
		}while(n!=4);
		
	}
	public static void showMenu() {
		System.out.println("1.Nhap so giang vien");
		System.out.println("2.Hien thi thong tin tat ca cac giang vien");
		System.out.println("3.Hien thi thong tin giang vien co luong cao nhat");
		System.out.println("4.Thoat chuong trinh");
	}

}