⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 flightinfonew.java

📁 java code for booking system use gui
💻 JAVA
字号:
import java.awt.Container;
import java.awt.Frame;
import java.awt.Button;
import java.awt.Panel;
import java.awt.TextField;
import java.applet.Applet;
import java.awt.*;
import java.awt.event.*;
import java.awt.Label;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import javax.swing.JOptionPane;

public class flightinfonew extends Applet {
    //Container contentPane=getContentPane();
    private long time;
    private String destination;
    private int price;
    private int total_seats;
    private String start_city;
    private seat[] seatinfo;

    public flightinfonew(long time, String dis, int price, int total_seats,String start_city) {
        this.time = time;
        this.destination = dis;
        this.price = price;
        this.total_seats = total_seats;
        this.start_city=start_city;
    }
public String get_start(){return start_city;}
    public flightinfonew() { };

    public int get_total_seat() { return total_seats; }

    public boolean check_total_seat(int total_seats) {
        if (total_seats <= 120)
            return true;
        else
            return false;
    }

    public void set_total_seat(int total_seats) { this.total_seats = total_seats; }

    public long get_time() { return time; }

    public String get_dis() { return destination; }

    public int get_price() { return price; }

    public void set_time(long time) { this.time = time; }

    public void set_price(int price) { this.price = price; }

    public void set_des(String des) { this.destination = des; }

    public String toString() {
        String out = "";
        out += "time" + time + ":: price" + price + ":: destination:" + destination + ":: remain seats " + total_seats+"start"+start_city + "\n";
        return out;
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -