?? booking.java
字號:
package com.nearhills;
import java.sql.*;
public class Booking {
int memberId;
int tripId;
public Booking() {
this( 0, 0 );
}
public Booking( int memberId, int tripId ) {
setMemberId( memberId );
setTripId( tripId );
}
void setMemberId( int memberId ) {
this.memberId = memberId;
}
int getMemberId( ) {
return memberId;
}
void setTripId( int tripId ) {
this.tripId = tripId;
}
int getTripId( ) {
return tripId;
}
void drop( )
throws DBopException, SQLException, BookingException
{
SkiTrip trip = SkiTrip.getTrip( getTripId() );
trip.dropBooking();
SkiClubDB.dropBooking( this );
SkiClubDB.updateTrip( trip );
}
void add( )
throws DBopException, SQLException, BookingException
{
SkiTrip trip = SkiTrip.getTrip( getTripId() );
trip.addBooking();
SkiClubDB.addBooking( this );
SkiClubDB.updateTrip( trip );
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -