• 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • Hello World!

    Beautiful World, Wonderful Life.

  • Change the World by Program.

  • A language that doesn't affect the way you think about programming, is not worth knowing.

    Alan J. Perlis

  • Mosher's Law of Software Engineering

    Don't worry if it doesn't work right.
    If everything did, you'd be out of a job.

  • Any code of your own that you haven't looked at for six or more months might as well have been written by someone else. (Eagleson's law)
  • Stewart Brand


    Once a new technology starts rolling, if you're
    not part of the steamroller, you're part of the road.

  • Bjarne Stroustrup

    There are only two kinds of programming languages:
    those people always bitch about and those nobody uses.

  • Nine women can't make a baby in one month.

  • Within a computer,
    natural language is unnatural.

  • If you're the smartest person in the room, then

    you're in the wrong room.

  • Without requirements or design,
    programming is the art of adding bugs to an empty text file.

    --Louis Srygley

  • Fools ignore complexity.
    Pragmatists suffer it.
    Some can avoid it.
    Geniuses remove it.

C++ Programming and Object-Oriented Design

Project 15. Stack Application System

 

Click to Download the Executable Files.       Click to Download the Sources Files. (Password Needed)

 

Name: Stack Application System
Copyright: Seng Dewen
Author: Seng Dewen
Date: Oct. 8, 2020
Description: Stack Application System.


菜单(Press 0 for English Menu)



Menu(按0切换到中文菜单)



1. Create Stack(创建栈)



2. Show Stack(显示栈)



3. Push to Stack(入栈)



4. Pop form Stack(出栈)



5. Get Top of Stack(获取栈顶元素)



6.Clear Stack(清空栈)



7. Palindrome String(回文问题)


A palindrome string is a sequence of characters which reads the same backward as forward, such as madam or racecar or abba.

Please check if a string is a Palindrome string.


8. Number System Conversion(数制转换问题)


To convert a number from source base to objective base. Each base of a number is between 2 and 62. Characters a-z stand for 10-35 and A-Z stand for 36-61.


9. Palindrome Number(数字回文问题)


A palindrome number reads the same backward as forward, such as 121 and 232. Of course, the property depends on the basis in which the number is represented.

For example, the number 75457 is a palindrome. The number 17 is not a palindrome in base 10, but its representation in base 2 (10001) is a palindrome.

The objective of this program is to verify if a given number is palindrome in any base from 2 to 62.


10. Brackets Matching(括号匹配问题)


Check wheter the brackets in the input string are matched exactly. The brackets include {,},[,],(,).


11. Hanoi Tower(汉诺塔问题)


You have 3 rods and N disks of different sizes which can slide onto any tower. The disks are sorted in ascending order of size from top to bottom. You have the following constraints:

* (A) Only one disk can be moved at a time.

* (B) A disk is slid off the top of one rod onto the next rod.

* (C) A disk can only be placed on top of a larger disk.

Write a program to move the N disks from the first rod to the last rod.


12. Expression Values(表达式求值)


Enter an expression with +-*/ and (), then caculate its value.


13. Backpack Problem(背包问题)


A backpack has a volume of T. There are N items with volumes of W0, W1...Wn-1. Ask if you can put some of these N items into the backpack so that the sum of their volumes is exactly T. For example:

(A)The volume of the backpack is T=10.

(B)The number of the items is N=6.

(C)Each volume of the items is W[6]={1,8,4,3,5,2}.

(D)The solutions are: (1,4,3,2) (1,4,5) (8,2) (3,5,2)


14. N Queens Problem(N-皇后问题)


The N-queen problem is the generalized problem of 8-queens or 4 queens' problem. Here, the N-queens are placed on a N * N chess board, which means that the chess board has N rows and N columns and the N queens are placed on thus N * N chess board such that no two queens are placed in the same row or in the same column or in same diagonal. So that, no two queens attack each other.


15. Maze Problem(迷宫问题)


Given a maze, find a path from start to goal.


16. Exit(退出程序)




 

 

 

Back to Top