首页 > 其他分享 >BLOG-2

BLOG-2

时间:2023-11-19 21:55:06浏览次数:26  
标签:return String int BLOG dish public out

复制代码


import java.time.DayOfWeek;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.time.format.DateTimeFormatter;
import java.util.*;

class UserInformation implements Comparable<UserInformation>{
public String name;
public String phone;
public int sum;

@Override
public int compareTo(UserInformation o) {
return this.name.compareTo(o.name);
}
}

class Tool {
public static Select FormatJudgment(String s) {
Select select = Select.ILLEGAL_FORMAT;
if (s.matches("[\\u4e00-\\u9fa5]+ [1-9][0-9]?[0-9]?[0-9]?"))
select = Select.MENU;//普通菜
if (s.matches("[\\u4e00-\\u9fa5]+ [\\u4e00-\\u9fa5]+ [1-9][0-9]?[0-9]?[0-9]? T"))
select = Select.SPE_MENU;//特殊菜
if (s.matches("table [1-9]+[0-9]?[0-9]? : [a-zA-Z]{1,10} (180|181|189|133|135|136)\\d{8} [0-9]{4}/[0-9]{1,2}/[0-9]{1,2} [0-9]{1,2}/[0-9]{1,2}/[0-9]{1,2}"))
select = Select.TABLE;//桌信息
if (s.matches("[1-9][0-9]? [\\u4e00-\\u9fa5]+ [0-9] [0-9]+ [1-9][0-9]?[0-9]?"))
select = Select.ORDER_SPECIAL;
if (s.matches("[1-9][0-9]? [\\u4e00-\\u9fa5]+ [0-9] [1-9][0-9]?[0-9]?"))
select = Select.ORDER;//点菜
if (s.matches("[1-9][0-9]{0,2} delete"))
select = Select.DELETE;//删除
if (s.matches("[0-9][0-9]{0,10} [1-9][0-9]{0,2} [\\u4e00-\\u9fa5]+ [0-9] [1-9][0-9]{0,2}"))
select = Select.ORDER_TO_OTHER;//代点
if (s.matches("[0-9][0-9]{0,10} [1-9][0-9]{0,2} [\\u4e00-\\u9fa5]+ [0-9]+ [0-9] [1-9][0-9]{0,2}"))
select = Select.ORDER_SPECIAL_TO_OTHER;
return select;

}

public static void panDuan(String[] t, ArrayList<Table> tables) {
String dateTime = t[2] + " " + t[3];
String pattern = "yyyy/M/d H/m/s";
DateTimeFormatter formatter = DateTimeFormatter.ofPattern(pattern);
LocalDateTime currentDateTime;
if (ifBeyond(t[1], 1, 55)) {
System.out.println(t[1] + "table num out of range");
Main.dishFlag = false;
return;
}


try {
formatter = DateTimeFormatter.ofPattern(pattern);
currentDateTime = LocalDateTime.parse(dateTime, formatter);
} catch (Exception e) {
System.out.println(t[1] + " date error");
Main.dishFlag = false;
return;
}

LocalDate currentDate = currentDateTime.toLocalDate();
LocalDate beginDate = LocalDate.of(2022, 1, 1);
LocalDate endDate = LocalDate.of(2023, 12, 31);
if (currentDate.isBefore(beginDate) || currentDate.isAfter(endDate)) {
System.out.println("not a valid time period");
Main.dishFlag = false;
return;
}

Main.dishFlag = true;
tables.add(new Table());
tables.get(tables.size() - 1).recordTableInformation(t);
}

public static int sToInt(String a) {
return Integer.parseInt(a);
}

public static boolean ifBeyond(String a, int begin, int end) {
if (sToInt(a) < begin || sToInt(a) > end)
return true;
return false;
}

public static boolean kouWeiPanDuanChaoChu(String s, int range, Menu m) {
String t = m.specialMenu.get(s).getValue();
/*Main.kouWei.forEach((key, value) ->
System.out.println("Key: " + key + ", Value: (" + value.getKey() + ", " + value.getValue() + ")"));*/

if (range < 0 || range > Main.kouWei.get(t).getKey()) {
System.out.println(Main.kouWei.get(t).getValue() + " num out of range :" + range);
return true;
}
return false;
}

public static int duiYingXuHao(String s, Menu m) {
String t = m.specialMenu.get(s).getValue();
if (t.equals("川菜"))
return 0;
if (t.equals("晋菜"))
return 1;
if (t.equals("浙菜"))
return 2;
return 0;
}

public static String lanweipandaun(String s, int fenShu, int sum) {
int dengij = (int) ((sum) * 1.0 / fenShu + 0.5);
String res="";
if (s.equals("川菜"))//不辣、微辣、稍辣、辣、很辣、爆辣
{
switch (dengij) {
case 0:
res = "不辣";
break;
case 1:
res = "微辣";
break;
case 2:
res = "稍辣";
break;
case 3:
res = "辣";
break;
case 4:
res = "很辣";
break;
case 5:
res = "爆辣";
break;
}
} else if (s.equals("晋菜"))//不酸、微酸、稍酸、酸、很酸;
{
switch (dengij) {
case 0:
res = "不酸";
break;
case 1:
res = "微酸";
break;
case 2:
res = "稍酸";
break;
case 3:
res = "酸";
break;
case 4:
res = "很酸";
break;
}
} else {
switch (dengij)//不甜、微甜、稍甜、甜;
{
case 0:
res = "不甜";
break;
case 1:
res = "微甜";
break;
case 2:
res = "稍甜";
break;
case 3:
res = "甜";
break;
}
}
return res;
}

public static void init() {
AbstractMap.SimpleEntry<Integer, String> stringStringSimpleEntry = new AbstractMap.SimpleEntry<Integer, String>(5, "spicy");
Main.kouWei.put("川菜", stringStringSimpleEntry);
AbstractMap.SimpleEntry<Integer, String> stringStringSimpleEntry1 = new AbstractMap.SimpleEntry<Integer, String>(4, "acidity");
Main.kouWei.put("晋菜", stringStringSimpleEntry1);
AbstractMap.SimpleEntry<Integer, String> stringStringSimpleEntry2 = new AbstractMap.SimpleEntry<Integer, String>(3, "sweetness");
Main.kouWei.put("浙菜", stringStringSimpleEntry2);
}
}


class Table {
public int tableNumber;
public String userName;
public String phoneNumber;
public String orderTime;
public ArrayList<Dish> dishes = new ArrayList<>();
public ArrayList<Integer> deletes = new ArrayList<>();
public int sum;
public KouWeiJiLu[] jiLus=new KouWeiJiLu[3];
public String[] caiName={"川菜","晋菜","浙菜"};
// public AbstractMap.SimpleEntry<String, String>[] teSeCaiKouWeiJiLu=new AbstractMap.SimpleEntry[3];

public Table(){
for (int i = 0; i < jiLus.length; i++) {
jiLus[i]=new KouWeiJiLu();
}
}
void delete(String[] t) {
if(!Main.dishFlag)
return;
int a = 0;
int number = Integer.parseInt(t[0]);
if (deletes.contains(number)) {
System.out.println("deduplication :" + number);
} else {

for(int i=dishes.size()-1;i>=0;i--)//反向循环删除
{
if(dishes.get(i).orderNumber==number)
{
Dish dish=dishes.get(i);
jiLus[Tool.duiYingXuHao(dish.name,Main.menu)].fenShu-=dish.number;
jiLus[Tool.duiYingXuHao(dish.name,Main.menu)].sum-=dish.number*dish.kouWei;
dishes.remove(i);
deletes.add(number);
a=1;

}
}
if (a == 0)
System.out.println("delete error;");
}

}

void recordTableInformation(String[] t) {
tableNumber = Integer.parseInt(t[1]);
orderTime = t[5] + " " + t[6];
userName =t[3];
phoneNumber =t[4];

System.out.println("table " + tableNumber + ": ");
Main.dishFlag=true;
Main.inFlag=false;
}

void order(String[] t, Menu m) {
if(!Main.dishFlag)return ;

String dishName = t[1];
if (!m.hasDish(dishName))
System.out.println(dishName + " does not exist");
else {
int aa=0;
for (int i = 0; i < dishes.size(); i++) {
if(dishes.get(i).name==t[1]&&(dishes.get(i).portion==Tool.sToInt(t[2])))
{
dishes.get(i).number+=Tool.sToInt(t[3]);
aa=1;
break;
}
}
if(aa==0)
{
Dish dish = new Dish();
dish.orderNumber = Integer.parseInt(t[0]);
dish.kouWei=Tool.sToInt(t[2]);
dish.name = t[1];
dish.price = m.getPrice(dish.name);
dish.portion = Integer.parseInt(t[2]);
dish.number = Integer.parseInt(t[3]);
dish.ifSpecial=false;
dishes.add(dish);
System.out.println(dish);
}
}
}


public void orderSpecial(String[] t, Menu m) {
if(!Main.dishFlag)return ;

String dishName = t[1];
if (!m.hasDish(dishName))
{
System.out.println(dishName + " does not exist");
}
else {
int aa=0;
for (int i = 0; i < dishes.size(); i++) {
if(dishes.get(i).name==t[1]&&(dishes.get(i).portion==Tool.sToInt(t[2])))
{
dishes.get(i).number+=Tool.sToInt(t[3]);
aa=1;
break;
}
}
if(aa==0)
{
int range=Tool.sToInt(t[2]);
if(Tool.kouWeiPanDuanChaoChu(t[1],range,m))
{
return ;
}
Dish dish = new Dish();
dish.orderNumber = Integer.parseInt(t[0]);
dish.name = t[1];
dish.price = m.getPrice(dish.name);
dish.portion = Integer.parseInt(t[3]);
dish.number = Integer.parseInt(t[4]);
dish.ifSpecial=true;
dishes.add(dish);
System.out.println(dish);

int xuHao=Tool.duiYingXuHao(t[1],m);
if( jiLus[xuHao].fenShu==-1)
jiLus[xuHao].fenShu=0;
jiLus[xuHao].fenShu+=dish.number;
jiLus[xuHao].sum+=dish.number*range;
}
}
}

void orderToOther(String[] t, Menu m) {
if(!Main.dishFlag)
return;
String dishName = t[2];
if (!m.hasDish(dishName))
System.out.println(dishName + " doer not exist");
else {
Dish dish = new Dish();
dish.orderNumber = Integer.parseInt(t[1]);
dish.name = t[2];
dish.price = m.getPrice(dish.name);
dish.portion = Integer.parseInt(t[3]);
dish.number = Integer.parseInt(t[4]);
dish.ifSpecial=false;
dishes.add(dish);
System.out.println(dish.orderNumber + " table " + tableNumber + " pay for table " + t[0] + " " + dish.totalPrice());
}

}

 

public void orderSpecialToOther(String[] t, Menu m) {
if(!Main.dishFlag)
return;
String dishName = t[2];
if (!m.hasDish(dishName))
System.out.println(dishName + " doer not exist");
else {

int range=Tool.sToInt(t[3]);
if(Tool.kouWeiPanDuanChaoChu(t[2],range,m))
{
return ;
}

Dish dish = new Dish();
dish.orderNumber = Integer.parseInt(t[1]);
dish.name = t[2];
dish.price = m.getPrice(dish.name);
dish.portion = Integer.parseInt(t[4]);
dish.number = Integer.parseInt(t[5]);
dish.ifSpecial=true;
dishes.add(dish);
System.out.println(dish.orderNumber + " table " + tableNumber + " pay for table " + t[0] + " " + dish.totalPrice());

int muBiaoTable=Tool.sToInt(t[0])-1;
int xuHao=Tool.duiYingXuHao(t[2],m);
if( Main.tables.get(muBiaoTable).jiLus[xuHao].fenShu==-1)
Main.tables.get(muBiaoTable).jiLus[xuHao].fenShu=0;
Main.tables.get(muBiaoTable).jiLus[xuHao].fenShu+=dish.number;
Main.tables.get(muBiaoTable).jiLus[xuHao].sum+=dish.number*range;
}
}

void getSum() {
int ans = 0;
int ans1 = 0;
double v = BusinessHours.getDiscount(orderTime);
double v1 = BusinessHours.getSpecialDiscount(orderTime);
for (Dish dish : dishes) {
ans1 += dish.total;
if (dish.ifSpecial)
{
ans += (int) (dish.total * v1 + 0.5);
}
else
ans += (int) (dish.total * v + 0.5);
}
sum = ans;
System.out.print("table " + tableNumber + ": " + ans1 + " " + sum+" ");
int aaa=0;
for (int i = 0; i < jiLus.length; i++) {
if(jiLus[i].fenShu!=-1&&jiLus[i].fenShu!=0)
{
if(aaa==0)
aaa=1;
else
{
System.out.print(" ");
}
System.out.print(caiName[i] + " " + jiLus[i].fenShu + " " + Tool.lanweipandaun(caiName[i], jiLus[i].fenShu, jiLus[i].sum));

}
}
System.out.println();

for (UserInformation user : Main.users) {
if(user.name.equals(userName)&&user.phone.equals(phoneNumber))
{
user.sum+=sum;
return;
}
}
UserInformation userInformation=new UserInformation();
userInformation.name=userName;
userInformation.phone=phoneNumber;
userInformation.sum=sum;
Main.users.add(userInformation);
}
}

enum Select {
MENU(1),
SPE_MENU(2),
TABLE(3),
ORDER(4),
ORDER_SPECIAL(7),
DELETE(5),
ORDER_TO_OTHER(6),
ORDER_SPECIAL_TO_OTHER(7),
ILLEGAL_FORMAT(0);

private final int value;

private Select(int value) {
this.value = value;
}

public int getValue() {
return value;
}
}

 


class Menu {
public Map<String, Integer> menu = new HashMap<>();
public Map<String, AbstractMap.SimpleEntry<Integer, String>> specialMenu = new HashMap<>();

public void addDish(String[] t) {

if(!Main.menuFlag&&Main.dishFlag)
{
System.out.println("invalid dish");
return ;
}
if(Main.menuFlag)
{
String a=t[1];
if(Tool.ifBeyond(a,1,299))
{
System.out.println(t[0] + " price out of range " + t[1]);
}
else
{
String dishName = t[0];
int price = Integer.parseInt(t[1]);
menu.put(dishName, price);
}
}
}

public void addDish1(String[] t) {//特色菜加菜

if(!Main.menuFlag&&Main.dishFlag)
{
System.out.println("invalid dish");
return ;
}
if(Main.menuFlag)
{

String a=t[2];
if(Tool.ifBeyond(a,1,299))
{
System.out.println(t[0] + " price out of range " + t[1]);
}
else {
String dishName = t[0];
int price = Integer.parseInt(t[2]);
AbstractMap.SimpleEntry<Integer, String> entry = new AbstractMap.SimpleEntry<>(price, t[1]);
specialMenu.put(dishName, entry);
}
}
}

public boolean hasDish(String dishName) {
return menu.containsKey(dishName) || specialMenu.containsKey(dishName);
}

public boolean ifSpecial(String dishName) {
if (specialMenu.containsKey(dishName))
return true;
return false;
}

public int getPrice(String dishName) {
if(ifSpecial(dishName))
return specialMenu.get(dishName).getKey();
return menu.get(dishName);
}
}

 


class KouWeiJiLu {
public int fenShu=-1;
public int sum;
}

 

class Dish {
public int orderNumber;
public String name;
public int price;
public int portion;
public int number;
public int total;
public boolean ifSpecial;
public int kouWei;


public int totalPrice() {
total=(int) ((1.0 * price * (portion + 1) / 2 * number)+0.5);
return total;
}

// public int discountedPrice(){
// }

@Override
public String toString() {
return orderNumber+" "+name+" "+totalPrice();
}
}

 

 


class BusinessHours {
private static final int startDay = 1;
private static final int endDay = 5;
private static final LocalTime startTime = LocalTime.of(17, 0);
private static final LocalTime endTime = LocalTime.of(20, 30);
private static final LocalTime startTime1 = LocalTime.of(10, 30);
private static final LocalTime endTime1 = LocalTime.of(14, 30);

private static final int Day = 7;
private static final int Day1=6;
private static final LocalTime startTime2 = LocalTime.of(9, 30);
private static final LocalTime endTime2 = LocalTime.of(21, 30);


public static double getDiscount(String dateTime) {
String pattern = "yyyy/M/d H/m/s";

DateTimeFormatter formatter = DateTimeFormatter.ofPattern(pattern);
LocalDateTime currentDateTime= LocalDateTime.parse(dateTime, formatter);
LocalDate currentDate = currentDateTime.toLocalDate();
LocalTime currentTime = currentDateTime.toLocalTime();
// 获取星期几
DayOfWeek dayOfWeek = currentDate.getDayOfWeek();
int week = dayOfWeek.getValue();
// 判断是否在周一到周五之间
if (week >= startDay && week <= endDay) {
if (myIsAfter(currentTime,startTime) && myIsBefore(currentTime,endTime)) {
return 0.8;
} else if (myIsAfter(currentTime,startTime1) && myIsBefore(currentTime,endTime1)) {
return 0.6;
}
}
if (week == Day||week==Day1) {
if (myIsAfter(currentTime,startTime2) && myIsBefore(currentTime,endTime2)) {
return 1;
}
}
return 0;
}

public static double getSpecialDiscount(String dateTime) {
String pattern = "yyyy/M/d H/m/s";

DateTimeFormatter formatter = DateTimeFormatter.ofPattern(pattern);
LocalDateTime currentDateTime= LocalDateTime.parse(dateTime, formatter);
LocalDate currentDate = currentDateTime.toLocalDate();
LocalTime currentTime = currentDateTime.toLocalTime();
// 获取星期几
DayOfWeek dayOfWeek = currentDate.getDayOfWeek();
int week = dayOfWeek.getValue();
// 判断是否在周一到周五之间
if (week >= startDay && week <= endDay) {
return 0.7;
}
if (week == Day||week==Day1) {
return 1;
}
return 0;
}

private static boolean myIsAfter(LocalTime a,LocalTime b)
{
if(a.isAfter(b)||a.equals(b))
return true;
return false;
}
private static boolean myIsBefore(LocalTime a,LocalTime b)
{
if(a.isBefore(b)||a.equals(b))
return true;
return false;
}
}

public class Main {

static boolean menuFlag = true;
static boolean dishFlag = false;
static boolean inFlag = false;

public static HashMap<String, AbstractMap.SimpleEntry<Integer, String>> kouWei = new HashMap<>();
public static Scanner sc = new Scanner(System.in);
public static ArrayList<Table> tables = new ArrayList<>();
public static Menu menu = new Menu();
public static ArrayList<UserInformation> users=new ArrayList<>();
public static void main(String[] args) {
Tool.init();
while (true) {
String a;
a = sc.nextLine();
if(a.equals("end"))
break;
String[] t = a.split("\\s");
Select select = Tool.FormatJudgment(a);
switch (select) {
case MENU:
menu.addDish(t);
break;
case SPE_MENU:
menu.addDish1(t);
break;
case TABLE:
menuFlag = false;
//Tool.panDuan(t, tables);//在table的格式合法的情况下进一步判断数据是否合法
String aa = t[5] + " " + t[6];
double v = BusinessHours.getDiscount(aa);
if (Double.compare(v, 0) == 0) {
System.out.println("table " + t[1] + " out of opening hours");
Main.dishFlag = false;
Main.inFlag = true;
break;
}
tables.add(new Table());
tables.get(tables.size() - 1).recordTableInformation(t);
break;
case ORDER_SPECIAL:
if (tables.size() > 0) {
tables.get(tables.size() - 1).orderSpecial(t, menu);
}
break;
case DELETE:
if (tables.size() > 0) {
tables.get(tables.size() - 1).delete(t);
}
break;
case ORDER:
if (tables.size() > 0) {
tables.get(tables.size() - 1).order(t, menu);
}
break;
case ORDER_SPECIAL_TO_OTHER:
if (tables.size() > 0) {
tables.get(tables.size() - 1).orderSpecialToOther(t, menu);
}
break;
case ORDER_TO_OTHER:
if (tables.size() > 0) {
tables.get(tables.size() - 1).orderToOther(t, menu);
}
break;
case ILLEGAL_FORMAT:
System.out.println("wrong format");
break;
}
}
for (Table table : tables) {
table.getSum();
}
Collections.sort(users);

for (int i = 0; i < users.size(); i++) {
System.out.print(users.get(i).name + " " + users.get(i).phone + " " + users.get(i).sum);
if(i<users.size()-1)
System.out.println();
}
/*for (UserInformation user : users) {
System.out.println(user.name + " " + user.phone + " " + user.sum);
}*/
}
}

复制代码
  1. 菜品类(Dish):

    • 属性:菜品编号、菜名、价格、描述、图片等。
    • 功能:获取菜品信息、修改菜品信息等。
  2. 订单类(Order):

    • 属性:订单号、用户ID、下单时间、订单状态、订单总价等。
    • 功能:添加、修改、查询订单、获取订单详情、获取订单状态、确认订单等。
  3. 用户类(User):

    • 属性:用户ID、用户名、密码、地址、电话等。
    • 功能:注册、登录、修改个人信息、查看历史订单等。
  4. 菜单类(Menu):

    • 属性:菜品列表。
    • 功能:获取全部菜品、按类别查询菜品等。

以上是一些基本的类设计,可以根据实际情况进行调整扩展。这些类之间的交互及数据流程如下:

  1. 用户浏览菜单时,菜单类提供全部菜品。用户选择菜品后,将菜品信息添加到购物车类中。
  2. 用户确认订单时,购物车类将菜品列表和总价传递给订单类,生成订单号、记录订单状态和提交时间等信息。
  3. 用户选择支付方式并进行支付操作时,支付类调用支付接口进行支付。
  4. 一旦订单支付成功,支付类将支付结果传递给订单类,更新订单状态。
  5. 用户可以通过订单类查看历史订单信息,包括订单状态、菜品信息和支付状态等。

综上所述,良好的类设计和分析可以使得点菜系统的功能更为清晰明了,易于开发、维护和扩展。

 

标签:return,String,int,BLOG,dish,public,out
From: https://www.cnblogs.com/nchu-wu/p/17842764.html

相关文章

  • java-blog2
    一、前言1、知识点:主要是java中类与类之间的关系和类图的构建以及对数据的处理2、题量:题量不大,简单的作业题量多点,难点的作业题量少点总体来说还行3、难度:难度在不断的变大,每一题所花的时间也在不断的增加二、设计与分析:第四次大作业:设计点菜计价程序,根据输入的信息,计算并输......
  • BLOG-2
    一、前言这几次的习题集都是围绕菜单计价程序进行的,对菜单计价程序进行了2,3,4,5的迭代,对一个程序进行的不同方向的深化。在深化的过程中我发现了自己在代码上很多方向上的不足,对面向对象编程的了解还不够,没有做出符合设计原则的设计。这导致我在对程序进行迭代的时候经常对代码......
  • BLOG-2
    1.前言1.知识点总结:第四次PTA作业集7-1菜单计价程序-3分数40全屏浏览题目切换布局作者 蔡轲单位 南昌航空大学设计点菜计价程序,根据输入的信息,计算并输出总价格。输入内容按先后顺序包括两部分:菜单、订单,最后以"end"结束。菜单由一条或多条......
  • BLOG-2
    作业总结1.1前言这几次作业主要是对菜单计价程序的完善,第四次作业中的菜单计价程序2是在菜单计价程序1的基础上进行完善,添加了输入菜单和份额的要求,难度还在可以接受的范围。第四次作业中的菜单计价程序3则是在菜单计价程序2的基础上添加了一系列的要求,包括添加桌号、代点菜......
  • 南昌航空大学JAVA Blog-2题目4-6期中考试
    一.前言 在进行题目集4-6的练习时,老师课堂上讲的内容一般都会围绕在这次题目集需要用到的新内容上。对于题目集代码的完成有很大的帮助,如课堂讲的封装、继承、多态等内容,简化了代码修改的难度,正则表达式则在一定程度上减少了代码量。但是就我个人认为,这几次的题目集除了期中考试......
  • BLOG-2
    一.前言  这次是对之前发布的PTA题目集4、5、6以及期中考试的总结。题目集4有两个题目,是菜单计价程序-2和菜单计价程序-3,难度较后面的题目来说相对简单,但是我当时还是觉得不简单。题目集5、6都只有一个题目,分别是菜单计价程序-4和菜单计价程序-5,是菜单计价程序的最后两个题目......
  • BLOG-2
    前言:这是本学期第二次博客作业,是对pta题目集4,5,6以及期中考试的总结。第四次作业难度正常,熟练掌握知识点应该就能完成。之后的第五次和第六次难度都非常高,需要花费很多时间。第四次作业主要考察了知识点:类的应用,正则表达式,面向对象思想;第五次作业主要考察了知识点:类的应用,面向对象......
  • BLOG-2
    (1)前言:题目集4:知识点:类与对象、字符串方法调用、边界值判断题量:中难度:难题集5:知识点:类与对象、正则表达式题量:大难度:难题目集6:知识点:类与对象、、边界值判断、正则表达式题量:大难度:难期中考试:知识点:类设计、继承与多态题量:中难度:中(2)设计与分析:题集4:主要题目为菜......
  • BLOG-2
    7-1菜单计价程序-3分数40全屏浏览题目切换布局作者 蔡轲单位 南昌航空大学设计点菜计价程序,根据输入的信息,计算并输出总价格。输入内容按先后顺序包括两部分:菜单、订单,最后以"end"结束。菜单由一条或多条菜品记录组成,每条记录一行每条菜品记录......
  • 南昌航空大学BLOG-2Java总结
    题目列表   前言、Java基础作业总结在Java基础作业中,我们学习了Java的基本语法、数据类型、运算符、流程控制等内容。通过作业的练习,我对Java的基础知识有了更深入的理解。在这次作业中,我发现了自己在一些基础知识上的不足,比如对于数据类型的理解不够深刻,对于流程控制的......