Git Product home page Git Product logo

design-pattern's Introduction

Design-Pattern

run test

同济大学软件学院 2021-2022 学年第 1 学期设计模式课程小组项目

NOTE: 命令行环境下请使用UTF-8编码运行

项目依赖

JDK >= 11

Maven

IntelliJ IDEA

运行方式

本项目支持两种运行方式

  1. 正常运行
  2. 运行测试

关于命令行

文字编码

本项目使用 UTF-8 作为文字编码,项目的输出统一为中文。

Win10 自带的命令行工具 cmdPowershell 默认使用 GBK 编码,在运行本项目时命令行中的输出可能会变成乱码 (如果没有出现乱码,可以跳过本段)。

注意: Win10 支持修改系统默认编码,但直接将系统默认编码改为 UTF-8 可能导致若干软件出错。

Powershell 中输入下列命令可以将 cmd 的默认编码改为 UTF-8:

> Set-ItemProperty 'HKCU:\Software\Microsoft\Command Processor' AutoRun 'chcp 65001 >NUL'

要回滚前述操作,可以在 Powershell 中输入下列命令:

> Set-ItemProperty 'HKCU:\Software\Microsoft\Command Processor' AutoRun ''

在命令行环境下运行测试

  1. 获取项目源码。
  2. 确保 Maven 配置完毕并可用。可以参照 Maven - Install。在 这里 下载 Maven
  3. 在项目根目录打开 shell,执行 mvn installMaven 会帮助你打包并运行所有的测试。
  4. 等待并检查输出。

运行成功输出:

截屏2021-11-06 下午8.10.38

在 IntelliJ IDEA 中运行测试

image-20211106204059594

在 IntelliJ IDEA 中正常运行

src/main/java/olympic/director/Main中运行main方法。

image-20211106203120733

在命令行正常运行

在项目根目录下使用命令mvn exec:java -Dexec.mainClass=olympic.main.director.Main

image-20211106203458617

使用jar包正常运行

使用命令java -jar jarAddress

image-20211106203643096

项目结构

Design-Pattern
├── src
│   ├── main 
│   │   ├── java	// 项目源文件
│   │   │   └── olympic
│   │   │       ├── main
│   │   │       │   ├── director
│   │   │       │   ├── drawlots
│   │   │       │   ├── game
│   │   │       │   │   ├── badminton
│   │   │       │   │   ├── basketball
│   │   │       │   │   │   └── round
│   │   │       │   │   ├── diving
│   │   │       │   │   ├── football
│   │   │       │   │   │   └── round
│   │   │       │   │   ├── pingponggame
│   │   │       │   │   ├── track
│   │   │       │   │   └── volleyball
│   │   │       │   │       └── round
│   │   │       │   ├── interview
│   │   │       │   │   ├── builder
│   │   │       │   │   └── questionstrategy
│   │   │       │   ├── opening
│   │   │       │   │   ├── deliverspeech
│   │   │       │   │   ├── enterarena
│   │   │       │   │   ├── fireworkshow
│   │   │       │   │   ├── performance
│   │   │       │   │   ├── protectionfactory
│   │   │       │   │   ├── ticketchecking
│   │   │       │   │   └── translate
│   │   │       │   ├── person
│   │   │       │   │   ├── athlete
│   │   │       │   │   │   ├── badminton
│   │   │       │   │   │   │   └── strategy
│   │   │       │   │   │   ├── basketballathlete
│   │   │       │   │   │   ├── divingathlete
│   │   │       │   │   │   ├── footballathlete
│   │   │       │   │   │   ├── pingong
│   │   │       │   │   │   │   └── strategy
│   │   │       │   │   │   ├── torchbarer
│   │   │       │   │   │   ├── track
│   │   │       │   │   │   └── volleyballathlete
│   │   │       │   │   ├── athleteList
│   │   │       │   │   │   └── urineTestProcurator
│   │   │       │   │   ├── interview
│   │   │       │   │   ├── personvisitor
│   │   │       │   │   │   └── visitFilterChain
│   │   │       │   │   └── volunteer
│   │   │       │   │       └── state
│   │   │       │   ├── postgame
│   │   │       │   │   ├── awardceremony
│   │   │       │   │   │   ├── factory
│   │   │       │   │   │   ├── medaldecorator
│   │   │       │   │   │   ├── olympicmedalfactory
│   │   │       │   │   │   └── prototypeframework
│   │   │       │   │   ├── chores
│   │   │       │   │   ├── medaltable
│   │   │       │   │   ├── monitorsite
│   │   │       │   │   └── reviewqualification
│   │   │       │   ├── precompetitionsystem
│   │   │       │   │   └── urinetest
│   │   │       │   └── pressconference
│   │   │       │       └── questionstrategy
│   │   │       ├── picture
│   │   │       ├── scene
│   │   │       ├── utils
│   │   │       └── voiceover
│   │   └── resources	// 资源文件
│   │       ├── person
│   │       ├── picture
│   │       └── voiceover
│   └── test	// 测试
│       └── java
│           └── olympic
│               └── scene
├── .gitignore  // git 配置文件
├── pom.xml     // maven 配置文件
└── README.md   // 本文档

74 directories, 318 files

design-pattern's People

Contributors

1918190 avatar even-ok avatar junjiell avatar ruanner avatar user3984 avatar wuyw127 avatar xmx-521 avatar yuuqingyang avatar zhangbaiyi avatar zhaobaba918 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.