课程设计之航空客运订票系统

article/2025/8/22 5:19:41
/***************************************************** 
* 版权所有(C)2016,王力源 
* 
*文件名称:A.C   航空售票系统 
*文件标识:无 
*内容摘要:航空售票系统 
*其他说明:无 
*当前版本:V1.0 
*作者:王力源 
*完成日期:2016.12.28 
* 
******************************************************/  
#include<iostream>
#include<fstream>
using namespace std;  
#include<stdlib.h>
#include<string.h>
/***************************************************** 
*功能描述:定义客户信息 
*输入参数:name,id,line_num,time1,time2,seat_num 
*输出参数:client 
txt文件 
******************************************************/  
typedef struct client  
{  
char name[20];//顾客名  
char id[10];//顾客证件号  
char line_num[10];//航班号  
char time1[10];//起飞时间  
char time2[10];//降落时间  
int seat_num;//座位号  
struct client *next;//下一个结点  
} client;  
//头结点  
typedef struct clienthead  
{  
int count;  
client *next;  
} clienthead;  
/***************************************************** 
*功能描述:定义航班信息 
*输入参数:line_num,time1,time2,seat_num,start_place,end_place,total 
*输出参数:airline 
txt 
******************************************************/  
typedef struct airline  
{  
char line_num[10];//航班号  
char start_place[20];//起飞地  
char end_place[20];//目的地  
char time1[10];//起飞时间  
char time2[10];//降落时间  
int total;//座位总数  
int left;//剩余座位  
struct airline *next;//下一个结点  
} airline;  
//头结点  
typedef struct airlinehead  
{  
int count;  
airline *next;  
} airlinehead;  
/***************************************************** 
*功能描述:录入航班函数 
*输入参数:line_num,start_place,end_place,time1,time2,total,left 
*输出参数:第i+1个航班录入 
******************************************************/  
airlinehead* import(int n,airlinehead *pheadline)//录入航班函数: n为所要录入航班的数量:  
{  
airline *temp = new airline;  
temp->next=NULL;  
pheadline->next=temp;  
pheadline->count = n;  
for(int i=0; i<n; i++)  
{  
cout<<"请输入第"<<i+1<<"个航班的航班号 ";  
cin>>temp->line_num;  
cout<<"请输入第"<<i+1<<"个航班的起飞地 ";  
cin>>temp->start_place;  
cout<<"请输入第"<<i+1<<"个航班的目的地 ";  
cin>>temp->end_place;  
cout<<"请输入第"<<i+1<<"个航班的起飞时间";  
cin>>temp->time1;  
cout<<"请输入第"<<i+1<<"个航班的降落时间";  
cin>>temp->time2;  
cout<<"请输入第"<<i+1<<"个航班的座位总数 ";  
cin>>temp->total;  
cout<<"本航班的剩余座位数:"<<left<<endl;  
temp->left=temp->total;  
cout<<"第"<<i+1<<"个航班成功录入。"<<endl;  
if(i<n-1)  
{  
temp->next = new airline;  
if(temp->next == NULL)  
{  
cout<<"分配内存失败"<<endl;    
exit(1);  
}  
temp->next->next=NULL;  
temp = temp->next;  
}  
}  
return pheadline;  
}  
/***************************************************** 
*功能描述:查询航班功能 
*输入参数:select,1,2 
*输出参数:航班号,起飞地,抵达地,起飞时间,降落时间,座位数,剩余座数 
*返回值:temp-成功,NULL-失败 
******************************************************/  
airline* query(airlinehead *phead )//查询航班情况  
{  
airline *find=NULL;  
airline *temp;  
cout<<"**********************************"<<endl;  
cout<<"* 1,按航线查询航班情况。         *"<<endl;  
cout<<"* 2,按起飞抵达城市查询航班情况。 *"<<endl;  
cout<<"**********************************"<<endl;  
cout<<"请选择:";  
int select;  
cin>>select;  
cout<<endl;  
switch(select)  
{  
case 1:  
{  
cout<<"请输入航班号:";  
char line_num[10];  
cin>>line_num;  
temp = phead->next;  
while(temp )  
{  
if(strcmp(temp->line_num,line_num) == 0)  
{  
find= temp;  
//display_line(find);  
return temp;  
break;  
}  
else  
{  
temp = temp->next;  
}  
}  
if(!temp)  
{  
cout<<"没有找到该航班的信息。"<<endl;  
return NULL;  
}  
break;  
}  
case 2:  
{  
char start_place[20];//起飞地  
char end_place[20];//目的地  
cout<<"请输入起飞地址:";  
cin>>start_place;  
cout<<"请输入目的地:";  
cin>>end_place;  
//airline *temp;  
temp=phead->next;  
while(temp)  
{  
if(strcmp(temp->start_place,start_place)==0 &&
strcmp(temp->end_place,end_place)==0)  
{  
find=temp;  
//return temp;  
break;  
}  
temp = temp->next;  
}  
if(!temp)  
{  
cout<<"没有找到该航班的信息。"<<endl;  
return NULL;  
}  
break;  
}  
default:  
cout<<"输入错误。"<<endl;  
break;  
}  
return find;  
}  
/***************************************************** 
*功能描述:查询航班功能 
*输入参数:select,1,2 
*输出参数:航班号,起飞地,抵达地,起飞时间,降落时间,座位数,剩余座数 
******************************************************/  
void display_line(airline *node)//输出一个航班结点的所有信息到屏幕  
{  
if(node==NULL)  
{  
cout<<"参数为空!输出失败."<<endl;  
return;  
}  
cout<<endl;  
cout<<"航班号\t\t 起飞地\t\t 目的地\t\t 起飞时间\t 降落时间\t 座位总数\t 剩余座位\t"<<endl;  
cout<<node->line_num<<"\t\t"
<<node->start_place<<"\t\t"
<<node->end_place<<"\t\t"
<<node->time1<<"\t"
<<node->time2<<"\t"
<<node->total<<"\t"
<<node->left<<"\t"
<<endl;  
}  
/****************************************************** 
*功能描述:输出所有的航班信息到屏幕 
*输入参数:无 
*输出参数:headline 
*******************************************************/  
void display_all_line(airlinehead *headline)  
{  
cout<<endl;  
airline *node;  
node = headline->next;  
if(!node)  
{  
cout<<"当前没有航班信息"<<endl;  
return ;  
}  
cout<<"航班数目: "<<headline->count<<endl;  
while(node)  
{  
display_line(node);  
node=node->next;  
}  
}  
/****************************************************** 
*功能描述:修改航班信息 
*输入参数:select 
*输出参数:无 
*返回值:0-正确,1-错误 
*******************************************************/  
int change_line(airlinehead *headline)//修改航班信息。  
{  
cout<<"当前所有航班的信息为:"<<endl;  
airline *temp,*t;  
int i;
temp = headline->next;  
while(temp)  
{  
display_line(temp);  
t=temp;
temp=temp->next;  
}  
cout<<endl;  
cout<<"请选择你要进行的操作:"<<endl;  
cout<<"1,增加航班。"<<endl;  
cout<<"2,删除航班。"<<endl;  
int select;  
cin>>select;  
cout<<endl;  
if(select>3 || select<1)  
{  
cout<<"输入错误。"<<endl;  
return 0;  
}  
switch(select)  
{  
case 1:  
{  
//temp->next = (airline*)malloc(sizeof(airline));  
temp=new airline;
// temp=temp->next;
cout<<"请输入要增加的航班号: ";  
cin>>temp->line_num;  
cout<<"请输入航班的起飞地: ";  
cin>>temp->start_place;  
cout<<"请输入航班的目的地: ";  
cin>>temp->end_place;  
cout<<"请输入航班的起飞时间:";  
cin>>temp->time1;  
cout<<"请输入航班的降落时间:";  
cin>>temp->time2;  
cout<<"请输入航班的座位总数: ";  
cin>>temp->total;  
t->next=temp;
temp->left=temp->total;  
temp->next=NULL;  
headline->count++;  
cout<<"增加成功。"<<endl;  
break;  
}  
case 2:  
{  
cout<<"请输入您要删除的航班的航班号: ";  
char line_num[10];  
cin>>line_num;  
airline * delline;  
delline = headline->next;  
while(delline)  
{  
if(strcmp(delline->next->line_num, line_num)==0)  
{  
i=1;
airline *plink;  
plink = delline->next->next;  
//free(delline->next);  
delete delline->next;  
delline->next=plink;  
headline->count--;  
}  
delline=delline->next;  
}  
if(delline == 0&&i!=1)  
{  
cout<<"没有找到输入的航班号。"<<endl;  
return 0;  
}  
i=0;
break;  
}  
case 3:  
{  
cout<<"请输入您要修改的航班的航班号:";  
char line_num3[10];  
cin>>line_num3;  
temp = headline->next;  
while(temp)  
{  
if(strcmp(temp->line_num, line_num3)==0)  
{  
i=1;
cout<<"请选择要修改的内容??"<<endl;  
cout<<"--1,座位总数。--"<<endl;  
cout<<"--2,起始地址。--"<<endl;  
cout<<"--3,目的地址。--"<<endl;  
}  
temp=temp->next;  
}  
if(temp==0&&i!=1)  
{  
cout<<"没有找到输入的航班号。"<<endl;  
return 0;  
}  
break;  
}  
}  
return 1;  
}  
/***************************************************** 
*功能描述:输出一个客户信息到屏幕 
*输入参数:无 
*输出参数:姓名,证件号码,座号,航班号,起飞时间,降落时间, 
******************************************************/  
void display_client(client *node=NULL)//输出一个客户节点的信息到屏幕。  
{  
if(node==NULL)  
{  
cout<<"参数为空!输出失败。"<<endl;  
return;  
}  
cout<<endl;  
cout<<"姓名\t\t"<<"证件号码\t"<<"座号\t"<<"起飞时间\t"<<"降落时间\t"<<"航班\t\t"<<endl<<endl;  
cout<<node->name<<"\t\t"
<<node->id<<"\t\t"
<<node->seat_num<<"\t\t"
<<node->time1<<"\t"
<<node->time2<<"\t"
<<node->line_num<<"\t\t"
<<endl;  
}  
/***************************************************** 
*功能描述:输出未售完票航班信息 
*输入参数:无 
*输出参数:headline 
******************************************************/  
void display_left_airline(airlinehead *headline)//输出未售完票的航班的信息。  
{  
airline *node = headline->next;  
if(!node)  
{  
cout<<"当前没有航班。。";  
}  
for(; node->left!=node->total; node = node->next)  
{  
display_line(node);  
}  
}  
/***************************************************** 
*功能描述:订票 
*输入参数:line_num,id 
*输出参数: 
*返回值:1-正确,0-错误 
******************************************************/  
int bookticket(airlinehead * headline,clienthead *headclient)//订票  
{  
//headclient->count=0;  
cout<<"请输入航班号: ";  
char line_num[10] ;  
cin>>line_num;  
airline *temp;  
temp=headline->next;  
while(temp)  
{  
if(strcmp(temp->line_num,line_num)==0)  
{  
break;  
}  
temp=temp->next;  
}  
if(!temp)  
{  
cout<<"未找到该航班"<<endl;  
return 0;  
}  
if(temp->left==0)  
{  
cout<<"对不起,该航班票已经售完。"<<endl;  
cout<<"请选择其他合适的航班.";  
}  
client *custom=new client;  
cout<<"请输入你的证件号码: ";  
cin>>custom->id;  
cout<<endl;  
cout<<"请输入你的姓名:";  
cin>>custom->name;  
cout<<endl;  
custom->seat_num=temp->total-temp->left+1;  
custom->next=NULL;  
strcpy(custom->line_num,line_num);  
temp->left--;  
headclient->count++;  
custom->next = headclient->next;  
headclient->next = custom;  
cout<<"订票成功!祝您旅途愉快~~";  
return 1;  
}  
/***************************************************** 
*功能描述:退票 
*输入参数:id 
*输出参数: 
*返回值:1-正确,0-错误 
******************************************************/  
int returnticket(airlinehead * headline,clienthead *headclient)//退票。  
{  
cout<<"请输入顾客的证件号码:id: ";  
char id[10];  
cin>>id;  
airline *airlinetemp= headline->next;  
client *clienttemp= headclient->next;  
if(NULL==airlinetemp)  
{  
cout<<"当前没有航班信息。"<<endl;  
return 0;  
}  
char line_num[10];  
client *delnext ;  
if(strcmp(clienttemp->id,id)==0)//要删除的节点为第一个时。。。  
{  
strcpy(line_num,clienttemp->line_num);  
headclient->next=clienttemp->next;  
delete clienttemp;  
while(airlinetemp)//修改对票客户所对应的航班的售票信息。  
{  
if(strcmp(line_num,airlinetemp->line_num)== 0 )  
{  
airlinetemp->left++;  
break;  
}  
airlinetemp = airlinetemp->next;  
}  
cout<<"退票成功!希望有机会与您继续合作。";  
return 1;  
}  
while(clienttemp->next)//要删除 的节点不是第一个时。。。  
{  
if(strcmp(clienttemp->next->id,id)==0)  
{  
strcpy(line_num,clienttemp->next->line_num);  
delnext = clienttemp->next->next;  
delete clienttemp->next;  
clienttemp->next=delnext;  
while(airlinetemp)//修改对票客户所对应的航班的售票信息。  
{  
if(strcpy(line_num,airlinetemp->line_num)== 0 )  
{  
airlinetemp->left++;  
break;  
}  
airlinetemp = airlinetemp->next;  
}  
cout<<"退票成功!有机会继续合作。"<<endl<<endl;  
return 1;  
break;  
}  
clienttemp = clienttemp->next;  
}  
cout<<"未找到该客户的信息。"<<endl;  
return 0;  
}  
/***************************************************** 
*功能描述:退票 
*输入参数:id 
*输出参数: 
*返回值:1-正确,0-错误 
******************************************************/  
int savemessage(airlinehead *headline,clienthead *headclient)//保存航班和客户的信息到相应的txt 文件中。  
{  
ofstream outline("airline.txt");  
if(!outline)  
{  
cout<<"航班信息文件打开失败。"<<endl;  
return 0;  
}  
cout<<"正在保存航班信息..."<<endl;  
outline<<headline->count<<endl;  
airline *linetemp = headline->next;  
while(linetemp)  
{  
outline<<linetemp->line_num<<""
<<linetemp->start_place<<""
<<linetemp->end_place<<""
<<linetemp->total<<""
<<linetemp->left<<""
<<endl;  
linetemp=linetemp->next;  
}  
outline.close();  
cout<<"航班信息保存成功..."<<endl;  
ofstream outclient("client.txt");  
if(!outclient)  
{  
cout<<"客户信息文件打开失败。"<<endl;  
return 0;  
}  
cout<<"正在保存客户信息文件..."<<endl;  
outclient<<headclient->count<<endl;  
client *clienttemp = headclient->next;  
while(clienttemp)  
{  
outclient<<clienttemp->name<<""
<<clienttemp->id<<""
<<clienttemp->line_num<<""
<<clienttemp->seat_num<<""
<<endl;  
clienttemp = clienttemp->next;  
}  
outclient.close();  
cout<<"客户信息保存成功。"<<endl;  
return 1;  
}  
/***************************************************** 
*功能描述:保存 
*输入参数: 
*输出参数: 
*返回值:1-正确,0-错误 
******************************************************/  
int loadmessage(airlinehead *headline,clienthead *headclient)//加载保存在文件中的信息。。  
{  
headline->next = NULL;  
headclient->next = NULL;  
ifstream inair("airline.txt");  
if(!inair)  
{  
cout<<"航班文件不能打开,信息加载失败。。。"<<endl;  
return 0;  
}  
cout<<"正在加载航班信息。。。"<<endl;  
inair>>headline->count;  
for(int i = 0; i<headline->count; i++)  
{  
airline *nodeline = new airline;  
inair>>nodeline->line_num  
>>nodeline->start_place  
>>nodeline->end_place  
>>nodeline->total  
>>nodeline->left;  
nodeline->next = headline->next;  
headline->next = nodeline;  
}  
inair.close();  
cout<<"航班信息加载完毕"<<endl;  
ifstream inclient("client.txt");  
if(!inclient)  
{  
cout<<"客户文件不能打开,信息加载失败"<<endl;  
return 0;  
}  
cout<<"正在加载客户信息。。。"<<endl;  
inclient>>headclient->count;  
for(  i=0; i<headclient->count; i++)  
{  
client *nodeline=new client;  
inclient>>nodeline->name>>nodeline->id>>nodeline->line_num>>nodeline->seat_num;  
nodeline->next=headclient->next;  
headclient->next=nodeline;  
}  
inclient.close();  
cout<<"客户信息加载完毕。。。"<<endl;  
return 1;  
}  
//主函数  
void main_menu()  
{  
cout<<"******************** 欢迎使用飞机售票系统************************"<<endl<<endl;  
cout<<"*** 1---- 录入航班信息。***"<<endl<<endl;  
cout<<"*** 2---- 加载航班信息。***"<<endl<<endl;  
cout<<"*** 3---- 查询航线信息。***"<<endl<<endl;  
cout<<"*** 4---- 客户订票。***"<<endl<<endl;  
cout<<"*** 5---- 客户退票。***"<<endl<<endl;  
cout<<"*** 6---- 保存操作。***"<<endl<<endl;  
cout<<"*** 7---- 输出所有航班信息。***"<<endl<<endl; 
cout<<"*** 8---- 修改航班信息。***"<<endl<<endl;
cout<<"*** 0---- 退出系统 。***"<<endl<<endl;  
cout<<"****************************************************************"<<endl<<endl;  
}  
int main()  
{  
airlinehead *headline=new airlinehead;  
headline->count=0;  
headline->next=NULL;  
clienthead *headclient=new clienthead;  
headclient->count=0;  
headclient->next=NULL;  
while(1)  
{  
main_menu();  
int n;  
cout<<"请选择您要进行的操作: ";  
cin>>n;  
cout<<endl;  
switch(n)  
{  
case 1:  
int num;  
cout<<"请选择您要录入的航班的数目: ";  
cin>>num;  
cout<<endl;  
import(num,headline);  
cout<<endl;  
//display_all_line(headline);  
cout<<"航班信息成功录入。。";  
cout<<endl<<endl;  
break;  
case 2:  
loadmessage(headline,headclient);  
break;  
case 3:  
airline *find;  
find=query(headline);  
if(find)  
{  
display_line(find);  
}  
break;  
case 4:  
bookticket( headline,headclient);  
//display_all_client(headclient);  
break;  
case 5:  
returnticket(headline,headclient);  
break;  
case 6:  
savemessage(headline,headclient);  
break;  
case 7:  
display_all_line(headline);  
break;  
case 8:
change_line(headline);
break;
case 0:  
exit(1);  
break;  
}  
}  
}  

 

 

 


 


http://chatgpt.dhexx.cn/article/fYugcOwX.shtml

相关文章

航空客运订票系统(数据结构课设)

前言&#xff1a; 广工数据结构课设&#xff0c;基本需求和选做内容以及一些小扩展均已实现&#xff0c;此博客仅展示一部分&#xff0c;实验报告文档、源代码和可运行程序&#xff08;.exe文件&#xff09;等可以去我的github或者码云上下载&#xff0c;如果对您有帮助&#…

python-数据结构-大学生-航空订票系统

python-数据结构-大学生-航空订票系统 1.问题描述及任务描述 1.1问题描述 航空订票系统&#xff1a;可以实现航空客运订票的主要业务活动 基本要求&#xff1a; &#xff08;1&#xff09;航线管理&#xff1a;每条航线所涉及的信息由&#xff1a;终点站名、航班号、飞机号、…

C语言航空订票系统课程设计

目录 1.设计目的&#xff1a; 2总体设计和功能&#xff1a; 3.菜单设计 4.各功能代码详解&#xff08;闲话少扯&#xff09;&#xff1a; 4.1.C语言文件的操作&#xff1a; 4.2.读取航班信息&#xff1a; C语言知识回顾 4.3.打印航班信息 5.根据要求查找航班&#xf…

C语言 数据结构课设 航空订票系统

目录 实现功能 部分功能测试截图 ​ 代码展示 实现功能 1.订票 2.退票 3.查询航班信息 4.修改航班信息 5.录入航班信息 6.打印订票信息 部分功能测试截图 功能选择界面 查询航班功能测试 订票功能测试 打印订票信息 代码展示 代码中需要的二个文件内容如下 第一个是代码中的…

【计算机毕业设计】41.航空订票系统

摘 要 网络的广泛应用给生活带来了十分的便利。所以把航空订票与现在网络相结合&#xff0c;利用JSP技术建设航空订票系统&#xff0c;实现航空订票的信息化。则对于进一步提高航班公司的发展&#xff0c;丰富航空订票经验能起到不少的促进作用。 航空订票系统能够通过互联网…

航空订票系统(javaweb项目)

航空订票系统课程设计 一、项目选题 航空订票系统 二、项目背景 当今社会知识经济高速发展&#xff0c;信息化在各个行业内正在被越来越广泛的应用。人们生活水平的不断提高&#xff0c;使得出行的交通工具也跟着发展起来。如今乘飞机出行的人越来越多&#xff0c;这方面的市…

数据结构课设——航空航天订票系统

文章目录 一、系统简介    1、业务活动    2、操作和功能二、系统功能模块图    1、系统功能模块图    2、函数功能模块三、详细描述    1、数据结构    2、设计思路四、运行结果    1、查询所有航班    2、根据起点终点搜索航班    3、订…

mysql导出表结构及数据的三种方法

navicat导出表一共有三中用法&#xff1a; 第一种&#xff1a;数据库上右键—>"转储SQL文件"&#xff0c;如图&#xff1a; "转储文件"是把整个数据库表全部导出&#xff0c;所有的表都是先drop然后create&#xff0c;insert。 第二种&#xff1a;部分表…

将mysql中的数据库表导出和导入

目录 导出数据库 导入数据库 导出数据库 如果你的mysql没有配置环境变量&#xff0c;首先需要进到你所安装的mysql目录下的bin目录 进入之后输入&#xff1a; mysqldump -uroot -p booksystem > booksystem.sql 其中booksystem是你要导出的数据库中的名字&#xff0c;book…

MySQL——表的导出和导入

有时会需要将MySQL数据4中的数据导出到外部存储文件中&#xff0c;MySQL数据库中的数据可以导出成qI文本文件、xml文件或者html文件&#xff0c;同样这些导出的文件也可以导入MySQL数据库中&#xff0c; 一. 表的导出 1. 用 SELECT…INTO OUTFILE 导出文本文件 在 MySQ…

C代码实现Mysql导出表数据,sql语句保存

概述 本人最近项目的要求&#xff0c;需要定时检查数据库变化&#xff0c;定时将变化的数据库数据导出来另外保存。 所以研究数据库数据导出功能&#xff0c;并记录下开发过程。因暂时没有需要&#xff0c;没有将数据库的结构保存。 软件环境 编译器&#xff1a;vs2022 数据…

MySQL导出表数据至excel表格

虽然很简单&#xff0c;但还是把步骤记下来&#xff0c;防止以后忘记 第一步&#xff1a;选中表名 点击导出向导 第二步&#xff1a;选择导出格式 第三步&#xff1a;选择导出.xlsx文件的名字以及存放路径 第四步&#xff1a;设置编码格式 第五步&#xff1a;设置导出数据是否…

mysql数据库导入导出sql文件

目录 1.导出sql文件2.导入sql文件 在使用MySQL数据库时&#xff0c;经常需要备份和恢复数据库&#xff0c;通过导出sql文件备份和直接执行sql文件恢复是非常便捷的方式。本篇博客主要介绍如何对MySQL数据库通过cmd命令导出和导入sql文件。 1.导出sql文件 导出sql文件可以使用m…

MySQL表的导出

MySQL表的导出有两种方式&#xff1a;1&#xff0c;select … into outfile … 2&#xff0c;mysqldump工具进行导出 1.select … into outfile … 方式导出&#xff1a; (1)默认导出地址查询&#xff1a;show variables like secure_file_priv&#xff0c;后续将该地址设为数据…

mysql数据库如何导出表和数据

1.选择需要导出的表 2.右击选择转储SQL文件 3.输入文件名选择sql脚本文件 4.完成

mysql导出表_mysql导出表的3种方式

文章转载自 &#xff1a; https://blog.csdn.net/jbb0403/article/details/26359573 navicat导出表一共有三中用法&#xff1a; 第一种&#xff1a;数据库上右键—>"转储SQL文件"&#xff0c;如图&#xff1a; "转储文件"是把整个数据库表全部导出&…

javase转javaee(java web)

1、点击help——>ininstall new software&#xff1b;点击add&#xff0c;输入name&#xff1a;javaweb &#xff1b; location&#xff1a;http://download.eclipse.org/releases/mars(该地址可以根据eclipse版本下载相应的jar包)&#xff1b;等待下载完成后重启ecli…

javase-jdk下载、安装、配置

一.下载 1.地址&#xff1a; http://www.oracle.com/technetwork/java/javase/downloads/index.html 二.安装 安装到默认路径…… 安装完后&#xff1a; 三.配置环境 在系统变量中操作 1.创建一个名为 JAVA_HOME 新的环境变量&#xff0c;输入变量值&#xff0c;如&#…

JavaSE JDK搭建

一、下载JDK 下载链接&#xff1a;https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html?ssSourceSiteIdotncn 二、JDK安装 默认安装路径即可 三、环境变量的配置 1 JAVA_HOME 注意&#xff1a;JAVA_HOME的值即为jdk的安装地址 2 pat…