联系方式

  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-23:00
  • 微信:codinghelp

您当前位置:首页 >> C/C++编程C/C++编程

日期:2024-03-13 10:34

8PRO102 – Programming Language (C++)

1

Project Week #2

Rules

? The project must be developed in a team (3-6 members)

? Using code from Internet is not allowed (Don’t take a premade project from internet).

? Comment your additional files.

? Choose one of the two projects (one is simpler but gives fewer points).

? Write a report describing the structure of your project (follow the template provided). Everything

must be explained in your report.

Project A

? Implement a meeting management application.

? The application allows the user to:

o Add, remove, update, show (information) people. A person has:

? An ID (composed by a 4-digit number (years of registration), and a counter that

increases each time one person is registered, 20221 for example)

? A first name and a last name.

? A status (Professor, Student, Administrative).

o Add, remove, update show (information) working rooms. Workings rooms have:

? An ID (a number)

? Maximum capacity

? Remote meeting (Visio telephony) system or not

o Schedule meetings (by adding people to working rooms and setting a period). A meeting

has:

? A period.

? A list of participants.

? The need for a visio telephony system or not

o Cancel meetings.

o A meeting that does not need visio telephony system can be set in a room that proposes

one. However, a meeting that needs a visio telephony system can not be set in a room

that does not propose one.

o Warn the user if a working room is not available for a specific period.

? Save and load from a file.

? Show credits.

? If the user tries to interrupt the program by pressing (CTRL + C) the application should asked the

user if they want to save before).

8PRO102 – Programming Language (C++)

2

? If a room is removed, and a meeting booked the room, the system asks the user to confirm. If the

user confirms all the meeting linked to this room are removed.

? If the user tries to add more participants than the room capacity, the system raises a message

and propose another room is one is available or another period.

Features Descriptions Score

Menu Main menu is show and can quit the program 1

Person Can add, remove, update and show a person, show option

prints all information about one person.

1

Working room Can add, remove, update and show a working room. Show

option prints, the ID of the room, maximum capacity, if the

room contains a visio telephony system or not, the number of

meetings linked to the meeting room

2

Meeting Can add, remove, update and show a meeting. Show option

prints, the ID of the room, the list of participants, the period, the

need for visio telephony system or not.

2

Save and load Can save and load from file (one or several, you can use JSON,

https://github.com/nlohmann/json)

2

Interrupt If the user press (CTRL + C) the application, ask if you want to

save before.

1

Credit The program show the names of all members of the group 1

Modulization Your project use headers files 1

Feedback Each action generates feedback to inform if the action has

been completed or not

1

Total 12

Welcome to Meeting Management Application

0 : Quit

1 : People menu

2 : Room menu

3 : Meeting menu

4 : Save/Load menu

5 : Credit

FIGURE 1: MAIN MENU

8PRO102 – Programming Language (C++)

3

People menu

0 : Back to main menu

1 : Register

2 : Show

3 : Update

People update menu.

> Enter person ID:

20221

> What do you want to update?

0: Cancel and back

1: First name

2: Last name

3: Status

Meeting menu

0 : Back to main menu

1 : Add

2 : Show

3 : Update

FIGURE 2: PEOPLE MENU

FIGURE 3: PEOPLE UPDATE MENU

FIGURE 4: MEETING MENU.

8PRO102 – Programming Language (C++)

4

Project B

? Implement a “Snake X Game of Life” game.

? “Snake X Game of Life”’s rules

o a two-dimensional orthogonal grid (400x400) of square cells

o each cell is in one of four possible states, alive (eatable, or rotten), dead, or wall.

o every cell interacts with its eight neighbours:

? Any alive(rotten) cell with fewer than two live neighbours dies.

? Any alive cell with two or three live neighbours lives on to the next generation.

? Any alive(rotten) cell with more than three live neighbours dies on to the next

generation.

? Any dead cell with exactly three live neighbours becomes alive(eatable) on to

the next generation. An eatable cell born with a counter starting at 10.

? Each time an eatable cell should die, the counter is decreased by 1. If the

counter reaches 0 the eatable cell is transformed into a rotten cell.

o The snake can eat alive cells.

o If the snake eats an eatable cell, its tail grown by one cell, the user owns 3 points.

o If the snake eats a rotten cell, its tail loses one cell. The user owns 1 point. If the length

of the tail is 0 the game is over.

o If the snake head hit a wall, or its tail the game is over.

o The snake’s head and tails are considered as alive cells.

o Wall are set a random position at the beginning of the game. All are considered as dead

cells.

Room booking menu.

> Do you need a visio telephony system? (y: yes, n: no)

y

> How many people?

16

> When? (MMDDHHmm)

03111500

> When? (MMDDHHmm)

03111500

> Time in minutes

60

> Rooms: 101, 102, 202, 301 are available. Which one would you like?

FIGURE 5: BOOKING MENU

8PRO102 – Programming Language (C++)

5

o The player can use WASD keys to move the snake.

o The snake starts with a tail tree size length.

o The score is saved and loaded from a file each time we launch and quit the game.

Features Descriptions Score

Graphics ? You draw the game by using the console, (1 point),

? or you use https://www.raylib.com/ (3 points)

The head and tails should have different form/colors

3

Move the snake Can move the snake using WASD keys 3

Score The score is updated each time the head eats an eatable cell 1

Tail size The tail is updated each time the head eats an eatable cell 2

Save and load Can save and load from file 1

Cells Cells follow game of life’s rules with new rules 1

Credit The program shows the names of all members of the group 1

Modulization Your project use headers files 1

Snake rules The game stops if the snake’s head hits his tail or wall cells 1

End of game Player’s score and Top score (10) is showed at the end of the

game. The users can enter their name.

2

Menu The player can start, view scores, or quit the game 1

Pause The game can be paused, and resumed 1

Cells preview The users can see a preview of next grid’s state if they don’t do

anything

2

Total 20

The following table shows optional features you can implement. You have to complete all core features

before implementing the following features.

Features Descriptions Score

Two players mode The game can be played with another player using arrows key.

Player one, starts on the left, player two on the right side of the

screen.

2

Network Two players mode using network 6

AI mode Two players mode where the second played is controlled by an

AI

4

Customization Players can customize the look of snakes (head, and tail) 1

Grid size Players can change during runtime the size of the grid 1

Total 14

Naming conventions and additional rules

1. Each cpp or header files much start with a “/**/” comment containing.

a. The name of the file

8PRO102 – Programming Language (C++)

6

b. Names and ID of all members of the group

c. Names of persons who work on the file.

2. Each variable, and function starts with lower case.

3. Classes, structures, and unions type start with upper case.

4. No chunk of code copied, pasted from internet.

Thank you!

Resources

? https://en.wikipedia.org/wiki/Conway's_Game_of_Life

? https://playgameoflife.com/

? https://conwaylife.com/

? https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines


相关文章

版权所有:留学生编程辅导网 2020 All Rights Reserved 联系方式:QQ:99515681 微信:codinghelp 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。 站长地图

python代写
微信客服:codinghelp