導航:首頁 > 觀影體驗 > java在線電影網站

java在線電影網站

發布時間:2025-08-03 05:39:20

1. JAVA 電影類

根據需要些就是了

public class Movie{
private String name;
private String director;
Sprivate String tarring;
Moive(String name,String director,String tarring)
{
this.name=name;
this.director =director;
this.tarring =tarring;
}
static public void main(Stirng[] str){
Moive m=new Moive("三國演義","張紀中","唐國強");
}
}

2. 怎樣用java代碼編寫網路小程序,下載某網站的電影

首先搞清楚那個網站的流媒體協議是什麼,然後google或是這種協議的傳送編碼規范,之後就是用socket向伺服器發送符合編碼規范的握手信息,建立起連接就ok了,就看著電影一點點地down下來吧

3. 電影院售票的求大蝦們幫我做一個電影院售票系統(C#,java都行)CS或者BS結構都行 ,很急 請大蝦們幫幫忙

這是我以前寫的
#include<stdio.h>
#include<string.h>
#defineN99//票數容量

structDate
{
intyear;
intmonth;
intday;
};
structWord
{
charmovie[20];//片名
structDatetime;//上映日期
intprice;//票價
intspare;//剩餘票數
}a[N],t;

voidnewticket(FILE*fp)
{
printf("片名:");
scanf("%s",t.movie);
printf("日期:(例如2014125) ");
scanf("%d%d%d",&t.time.year,&t.time.month,&t.time.day);
printf("票價:");
scanf("%d",&t.price);
printf("剩餘票數:");
scanf("%d",&t.spare);
if(t.spare!=0)//余票不為0
fprintf(fp,"%-20s%4d-%02d-%02d%3d%3d ",t.movie,t.time.year,
t.time.month,t.time.day,t.price,t.spare);
fclose(fp);
}

voidlook(FILE*fp)
{
inti,n=0;
// charch;
fclose(fp);
fp=fopen("電影票.txt","r");
for(i=0;i<N;i++)
{
fscanf(fp,"%s%d-%d-%d%d%d ",a[i].movie,&a[i].time.year,
&a[i].time.month,&a[i].time.day,&a[i].price,&a[i].spare);
if(a[i].spare>0)n++;
}
for(i=0;i<n;i++)
printf("%-20s%4d-%02d-%02d%3d%3d ",a[i].movie,a[i].time.year,
a[i].time.month,a[i].time.day,a[i].price,a[i].spare);
fclose(fp);
}

voidmenu()
{
printf("========電影票管理系統======== ");
printf("1.添加售票2.余票查詢 0.退出程序 ");
printf("============================== ");
printf("功能選項:");
}

intmain()
{
FILE*fp;
charc;
while(1)
{
menu();
scanf("%c",&c);
fp=fopen("電影票.txt","a+");
switch(c)
{
case'1':newticket(fp);break;
case'2':look(fp);break;
case'0':return0;
}
}
}

4. JAVA 模擬抽獎,輸入4位號碼,如果這個號碼的百位數能夠被3整除,你就可以再免費領取一張電影票

packagecom.java.test01;

importjava.util.Scanner;

/**
*JAVA模擬抽獎,輸入4位號碼,
*如果這個號碼的百位數能夠被3整除,
*你就可以再免費領取一張電影票
*@authorAdministrator
*
*/
publicclassChou{
publicstaticvoidmain(String[]args){
Scannersc=newScanner(System.in);
//循環,模擬一直抽獎
while(true){
System.out.println("請輸入4位號碼:");
if(sc.hasNext()){
//獲取號碼
intnumber=sc.nextInt();
//獲取百位的數字
int=number/100%10;
//判斷是否符合條件
if(%3==0){//能被3整除
System.out.println("恭喜你領到了一張電影票!");
}else{
System.out.println("很遺憾,未中獎!");
}

}else{
System.out.println("請正確輸入!");
}
}
}
}

閱讀全文

與java在線電影網站相關的資料

熱點內容
感動到讓人淚奔的愛情電影 瀏覽:994
電影院時間軸圖片 瀏覽:55
現代音樂在電影中的應用 瀏覽:205
英文電影帕丁頓熊 瀏覽:118
周星馳都演過哪幾部電影 瀏覽:685
老電影愛情視頻在線 瀏覽:139
永不妥協電影結局 瀏覽:464
家園電影觀後感800字 瀏覽:137
關曉彤莎莎什麼電影 瀏覽:806
冒險電影英文怎麼讀 瀏覽:238
催淚電影大全韓劇 瀏覽:258
末日電影大全2015 瀏覽:992
加拿大電影票 瀏覽:12
心理罪電影講的什麼 瀏覽:860
電影人的自我介紹英文版 瀏覽:578
干老母電影網站 瀏覽:242
我之前也看電影英文 瀏覽:101
鬼滅之刃免費中文版電影 瀏覽:267
電影演員男照片大全 瀏覽:699
徐徑電影院 瀏覽:152