├── AlgorithmsAnalysis ├── AlgorithmLab1.c ├── AlgorithmLab2.c ├── AlgorithmLab3.c ├── AlgorithmLab4.c ├── AlgorithmLab4_2.c ├── 上机实验.pdf ├── 算法1实验报告.docx ├── 算法2实验报告.docx ├── 算法3实验报告.docx └── 算法4实验报告.docx ├── DataStructure ├── 1.txt ├── 2.txt ├── 4.txt ├── 5.txt ├── 6.1.txt ├── 6.2.txt ├── 6.3.txt ├── DS实验报告.pdf ├── DataStructure1.c ├── DataStructure3.c ├── DataStructure4.c ├── DataStructure5.c ├── DataStructure6.c └── datastructure2.c ├── Database System ├── untitiled.md ├── 图1.png ├── 图10.png ├── 图11-2.png ├── 图11.png ├── 图12.png ├── 图13.png ├── 图14.png ├── 图15.png ├── 图16.png ├── 图18.png ├── 图19.png ├── 图2.jpeg ├── 图20.png ├── 图21.png ├── 图22.png ├── 图24.png ├── 图25.png ├── 图26.png ├── 图27.png ├── 图28.png ├── 图29.png ├── 图3-2.png ├── 图3.png ├── 图30.png ├── 图4.png ├── 图5.png ├── 图6.png ├── 图7.png ├── 图8-2.png ├── 图8.png ├── 图9.png ├── 实验报告.pdf └── 数据库原理实验.pdf ├── Object_Oriented_Programming_Assignment ├── program │ ├── Summary.md │ ├── Summary.pdf │ ├── TheSolitareGame │ │ ├── .idea │ │ │ ├── dictionaries │ │ │ │ └── Tangrizzly.xml │ │ │ ├── inspectionProfiles │ │ │ │ └── Project_Default.xml │ │ │ ├── misc.xml │ │ │ ├── modules.xml │ │ │ └── workspace.xml │ │ ├── TheSolitareGame.iml │ │ ├── out │ │ │ └── production │ │ │ │ └── TheSolitareGame │ │ │ │ ├── PNG-cards │ │ │ │ ├── 10_of_clubs.png │ │ │ │ ├── 10_of_diamonds.png │ │ │ │ ├── 10_of_hearts.png │ │ │ │ ├── 10_of_spades.png │ │ │ │ ├── 11_of_clubs.png │ │ │ │ ├── 11_of_diamonds.png │ │ │ │ ├── 11_of_hearts.png │ │ │ │ ├── 11_of_spades.png │ │ │ │ ├── 12_of_clubs.png │ │ │ │ ├── 12_of_diamonds.png │ │ │ │ ├── 12_of_hearts.png │ │ │ │ ├── 12_of_spades.png │ │ │ │ ├── 13_of_clubs.png │ │ │ │ ├── 13_of_diamonds.png │ │ │ │ ├── 13_of_hearts.png │ │ │ │ ├── 13_of_spades.png │ │ │ │ ├── 1_of_clubs.png │ │ │ │ ├── 1_of_diamonds.png │ │ │ │ ├── 1_of_hearts.png │ │ │ │ ├── 1_of_spades.png │ │ │ │ ├── 1_of_spades2.png │ │ │ │ ├── 2_of_clubs.png │ │ │ │ ├── 2_of_diamonds.png │ │ │ │ ├── 2_of_hearts.png │ │ │ │ ├── 2_of_spades.png │ │ │ │ ├── 3_of_clubs.png │ │ │ │ ├── 3_of_diamonds.png │ │ │ │ ├── 3_of_hearts.png │ │ │ │ ├── 3_of_spades.png │ │ │ │ ├── 4_of_clubs.png │ │ │ │ ├── 4_of_diamonds.png │ │ │ │ ├── 4_of_hearts.png │ │ │ │ ├── 4_of_spades.png │ │ │ │ ├── 5_of_clubs.png │ │ │ │ ├── 5_of_diamonds.png │ │ │ │ ├── 5_of_hearts.png │ │ │ │ ├── 5_of_spades.png │ │ │ │ ├── 6_of_clubs.png │ │ │ │ ├── 6_of_diamonds.png │ │ │ │ ├── 6_of_hearts.png │ │ │ │ ├── 6_of_spades.png │ │ │ │ ├── 7_of_clubs.png │ │ │ │ ├── 7_of_diamonds.png │ │ │ │ ├── 7_of_hearts.png │ │ │ │ ├── 7_of_spades.png │ │ │ │ ├── 8_of_clubs.png │ │ │ │ ├── 8_of_diamonds.png │ │ │ │ ├── 8_of_hearts.png │ │ │ │ ├── 8_of_spades.png │ │ │ │ ├── 9_of_clubs.png │ │ │ │ ├── 9_of_diamonds.png │ │ │ │ ├── 9_of_hearts.png │ │ │ │ ├── 9_of_spades.png │ │ │ │ ├── back.png │ │ │ │ ├── black_joker.png │ │ │ │ ├── empty.png │ │ │ │ ├── red_joker.png │ │ │ │ └── win.png │ │ │ │ ├── card │ │ │ │ ├── Card$CardShape.class │ │ │ │ ├── Card.class │ │ │ │ ├── CardPile.class │ │ │ │ ├── DeckPile.class │ │ │ │ ├── DiscardPile.class │ │ │ │ ├── Image.class │ │ │ │ ├── MoveCardPile.class │ │ │ │ ├── SuitPile.class │ │ │ │ └── TablePile.class │ │ │ │ └── game │ │ │ │ ├── Game.class │ │ │ │ ├── Solitaire.class │ │ │ │ └── SolitaireGame.class │ │ └── src │ │ │ ├── PNG-cards │ │ │ ├── 10_of_clubs.png │ │ │ ├── 10_of_diamonds.png │ │ │ ├── 10_of_hearts.png │ │ │ ├── 10_of_spades.png │ │ │ ├── 11_of_clubs.png │ │ │ ├── 11_of_diamonds.png │ │ │ ├── 11_of_hearts.png │ │ │ ├── 11_of_spades.png │ │ │ ├── 12_of_clubs.png │ │ │ ├── 12_of_diamonds.png │ │ │ ├── 12_of_hearts.png │ │ │ ├── 12_of_spades.png │ │ │ ├── 13_of_clubs.png │ │ │ ├── 13_of_diamonds.png │ │ │ ├── 13_of_hearts.png │ │ │ ├── 13_of_spades.png │ │ │ ├── 1_of_clubs.png │ │ │ ├── 1_of_diamonds.png │ │ │ ├── 1_of_hearts.png │ │ │ ├── 1_of_spades.png │ │ │ ├── 1_of_spades2.png │ │ │ ├── 2_of_clubs.png │ │ │ ├── 2_of_diamonds.png │ │ │ ├── 2_of_hearts.png │ │ │ ├── 2_of_spades.png │ │ │ ├── 3_of_clubs.png │ │ │ ├── 3_of_diamonds.png │ │ │ ├── 3_of_hearts.png │ │ │ ├── 3_of_spades.png │ │ │ ├── 4_of_clubs.png │ │ │ ├── 4_of_diamonds.png │ │ │ ├── 4_of_hearts.png │ │ │ ├── 4_of_spades.png │ │ │ ├── 5_of_clubs.png │ │ │ ├── 5_of_diamonds.png │ │ │ ├── 5_of_hearts.png │ │ │ ├── 5_of_spades.png │ │ │ ├── 6_of_clubs.png │ │ │ ├── 6_of_diamonds.png │ │ │ ├── 6_of_hearts.png │ │ │ ├── 6_of_spades.png │ │ │ ├── 7_of_clubs.png │ │ │ ├── 7_of_diamonds.png │ │ │ ├── 7_of_hearts.png │ │ │ ├── 7_of_spades.png │ │ │ ├── 8_of_clubs.png │ │ │ ├── 8_of_diamonds.png │ │ │ ├── 8_of_hearts.png │ │ │ ├── 8_of_spades.png │ │ │ ├── 9_of_clubs.png │ │ │ ├── 9_of_diamonds.png │ │ │ ├── 9_of_hearts.png │ │ │ ├── 9_of_spades.png │ │ │ ├── back.png │ │ │ ├── black_joker.png │ │ │ ├── empty.png │ │ │ ├── red_joker.png │ │ │ └── win.png │ │ │ ├── card │ │ │ ├── Card.java │ │ │ ├── CardPile.java │ │ │ ├── DeckPile.java │ │ │ ├── DiscardPile.java │ │ │ ├── Image.java │ │ │ ├── MoveCardPile.java │ │ │ ├── SuitPile.java │ │ │ └── TablePile.java │ │ │ └── game │ │ │ ├── Game.java │ │ │ ├── Solitaire.java │ │ │ └── SolitaireGame.java │ ├── World of Warcraft │ │ ├── code │ │ │ ├── arm.hpp │ │ │ ├── carm.hpp │ │ │ ├── city.hpp │ │ │ ├── clock.hpp │ │ │ ├── cwarrior.hpp │ │ │ ├── headquarter.cpp │ │ │ ├── headquarter.hpp │ │ │ ├── main.cpp │ │ │ └── warrior.hpp │ │ └── out_example │ ├── eight_queens.cpp │ ├── output1.png │ ├── output2.png │ ├── sg_output1.png │ ├── sg_output2.png │ ├── sg_output3.png │ └── 用C++实现面向对象的带界面的程序.doc ├── week1 │ ├── Homework1 Request.pdf │ ├── Homework1 Summary.pdf │ ├── Lab1 Request.doc │ ├── Lab1 Summary.pdf │ ├── homework1_1.c │ ├── homework1_2.cpp │ ├── lab1_1.cpp │ ├── lab1_2.cpp │ ├── lab1_3 │ │ ├── 01.in │ │ ├── 01.out │ │ ├── lab1_3 │ │ ├── main │ │ └── main.cpp │ └── lab1_4.cpp ├── week2 │ ├── homework2.md │ ├── homework2.pdf │ ├── homework2_1 │ │ ├── class list.png │ │ ├── class queen.png │ │ ├── homework2_1 │ │ ├── homework2_1.cpp │ │ ├── output1.png │ │ └── output2.png │ ├── homework2_2.cpp │ ├── homework2_2.png │ ├── lab2.md │ ├── lab2.pdf │ ├── lab2_1.cpp │ ├── lab2_1.png │ ├── lab2_2.cpp │ ├── lab2_2.png │ ├── lab2_3.png │ ├── lab2_3stack.cpp │ ├── lab2_4.cpp │ ├── lab2_4.png │ └── 实验二.doc ├── week3 │ ├── Screen Shot 2017-12-04 at 2.35.31 PM.png │ ├── homework3_1.cpp │ ├── lab3.md │ ├── lab3.pdf │ ├── lab3_1.cpp │ ├── lab3_1_1.png │ ├── lab3_1_2.png │ ├── lab3_2.cpp │ ├── lab3_2.png │ ├── lab3_3.cpp │ ├── lab3_3.png │ ├── lab3_4.cpp │ ├── lab3_4.png │ ├── 实验三 .doc │ └── 第三周作业.pdf ├── week4 │ ├── lab4.pdf │ ├── lab4_1.cpp │ ├── lab4_1.png │ ├── lab4_2.cpp │ ├── lab4_2.png │ ├── lab4_3.cpp │ ├── lab4_3_*.png │ ├── lab4_3_: .png │ ├── lab4_3_big*.png │ ├── lab4_3_big+.png │ ├── lab4_3_big-.png │ ├── lab4_3_big-_neg.png │ ├── lab4_3_big: .png │ ├── lab4_3_big:_wrong.png │ ├── lab4_4.png │ ├── lab4_4_account.hpp │ ├── lab4_4_date.hpp │ ├── lab4_4_main.cpp │ ├── 实验4.md │ └── 实验四.doc ├── week5 │ ├── lab5.md │ ├── lab5.pdf │ ├── lab5_1.cpp │ ├── lab5_1.png │ ├── lab5_2.cpp │ ├── lab5_2.png │ ├── lab5_3.png │ ├── lab5_3 │ │ ├── lab5_3_account.hpp │ │ ├── lab5_3_accumulator.hpp │ │ ├── lab5_3_creditaccount.hpp │ │ ├── lab5_3_date.hpp │ │ ├── lab5_3_main.cpp │ │ └── lab5_3_savingaccount.hpp │ └── 实验五.doc └── week6 │ ├── lab6.md │ ├── lab6_1 │ ├── 48329561 │ ├── 08261831 │ ├── lab6_1_Controller.hpp │ ├── lab6_1_account.hpp │ ├── lab6_1_accumulator.hpp │ ├── lab6_1_creditaccount.hpp │ ├── lab6_1_date.hpp │ ├── lab6_1_main.cpp │ └── lab6_1_savingsaccount.hpp │ ├── lab6_1_1.png │ ├── lab6_1_2.png │ ├── lab6_1_3.png │ ├── lab6_2 │ ├── arm.hpp │ ├── carm.hpp │ ├── city.hpp │ ├── clock.hpp │ ├── cwarrior.hpp │ ├── headquarter.cpp │ ├── headquarter.hpp │ ├── main.cpp │ └── warrior.hpp │ ├── out_example │ └── 实验六.doc ├── README.md ├── Verilog实验报告 └── Verilog实验报告.docx ├── 微机接口大作业 └── 微机接口大作业.pdf ├── 微机接口实验 ├── 创新设计 │ ├── proteus仿真代码.asm │ ├── 实验箱代码.asm │ ├── 捕获.PNG │ ├── 流程图.png │ └── 综合设计实验.docx ├── 预习报告.pages ├── 验证实验.docx └── 验证实验proteus8255.pdsprj ├── 操作系统实验 └── 实验报告.docx ├── 数字逻辑实验 ├── .DS_Store ├── 实验1_flowing_light │ ├── .DS_Store │ ├── flowing_light.v │ ├── test.v │ ├── top_xdc.xdc │ └── 数字逻辑实验一.docx ├── 实验2 │ ├── adder1 │ │ ├── adder1.v │ │ └── tb.v │ ├── adder2 │ │ ├── adder2.v │ │ └── tb.v │ ├── adder3 │ │ ├── adder3.v │ │ └── tb.v │ ├── div8 │ │ ├── div8.v │ │ ├── div8_sim.v │ │ └── test.v │ ├── div_4 │ │ ├── div4.v │ │ └── test.v │ ├── mul4 │ │ ├── mul.v │ │ └── test.v │ ├── mult8 │ │ ├── mult.v │ │ └── test.v │ └── 数字逻辑实验二.docx ├── 实验3 │ ├── lab3_1 │ │ ├── GPU.v │ │ ├── clkDiv.v │ │ ├── segMsg.v │ │ ├── show number.v │ │ └── top.v │ ├── lab3_2 │ │ ├── GPU.v │ │ ├── clkDiv.v │ │ ├── segMsg.v │ │ ├── shake_elimination.v │ │ └── top.v │ ├── lab3_3 │ │ ├── GPU.v │ │ ├── SRAMRead.v │ │ ├── SRAMWrite.v │ │ ├── clkDiv.v │ │ ├── segMsg.v │ │ ├── shake_elimination.v │ │ └── top.v │ └── 数字逻辑实验三.docx ├── 实验5 │ ├── lifegame │ │ ├── anti_jitter.v │ │ ├── button_pointer.v │ │ ├── clock_divider.v │ │ ├── clock_divider_to_125ms.v │ │ ├── color_circlizer.v │ │ ├── color_generator.v │ │ ├── gen_random.v │ │ ├── life_game.v │ │ ├── life_game_test.v │ │ ├── multiplexer_4_1.v │ │ ├── top.v │ │ ├── vga_controller.v │ │ └── xdc.xdc │ ├── 实验五.docx │ └── 游戏演示ppt.pdf └── 实验四 │ ├── 4.1_mealy │ ├── mealy.v │ └── test.v │ ├── 4.2moore │ ├── moore.v │ └── test.v │ ├── 4.3mearly │ ├── 4.3mealy │ └── mearlytb.v │ ├── 4.3moore │ ├── moore.v │ └── tb.v │ ├── 4.4elevator │ ├── BUTTON.v │ ├── CLKDIV.v │ ├── GPU.v │ ├── SEG.v │ ├── TOP.v │ ├── gputb.v │ └── xdc.xdc │ └── 实验四.docx ├── 计算机组成原理 ├── 计算机组成原理实验报告 │ ├── ALU │ │ ├── ALU.v │ │ └── alu_tb.v │ ├── Cache_final │ │ ├── AreaMem.v │ │ ├── Cache.v │ │ ├── CacheMem.v │ │ ├── Cache_tb.v │ │ └── Compare.v │ ├── IFU │ │ ├── IFU.v │ │ └── IFU_tb.v │ ├── RegisterFiles │ │ ├── RegisterFile.v │ │ └── RegisterFile_tb.v │ ├── SRAM │ │ ├── dataMem.v │ │ └── dataMem_tb.v │ ├── mips │ │ ├── ALUControl.v │ │ ├── JR_Control.v │ │ ├── alu.v │ │ ├── control.v │ │ ├── data_memory.v │ │ ├── instr_mem.v │ │ ├── mips_16.v │ │ ├── register_file.v │ │ └── testbench.v │ ├── project_6 │ │ ├── Ctrl.v │ │ └── Ctrl_tb.v │ └── 计算机组成原理实验报告.pdf └── 计组实验要求2017.pptx └── 计算机网络实验 ├── 第一次实验报告.docx ├── 第三次实验报告.docx ├── 第二次实验报告.docx └── 第四次实验报告.docx /AlgorithmsAnalysis/AlgorithmLab1.c: -------------------------------------------------------------------------------- 1 | // 2 | // AlgorithmLab1.c 3 | // Requirements: 4 | // X = Y^Z mod D. Y and Z belongs to [0, 2147483647] and D belongs to [1, 46340] 5 | // Input several groups of testing data "Y, Z, D" 6 | // Output "X" 7 | // 8 | // Created by Tangrizzly on 16/11/2017. 9 | // Copyright © 2017 Tangrizzly. All rights reserved. 10 | // 11 | 12 | #include "stdio.h" 13 | 14 | int count(int Y, int Z, int D) { 15 | if (Z == 1) { 16 | return Y % D; 17 | } else if (Z%2 == 0) { 18 | return count(Y, Z/2, D) * count(Y, Z/2, D) % D; // (Y*Y)^(Z/2) mod D 19 | } else { 20 | return (count(Y, Z/2, D) * count(Y, Z/2, D) % D) *(Y % D) % D;// (Y*Y)^(Z/2)*Y mod D 21 | } 22 | } 23 | 24 | int main() { 25 | int Y, Z, D; 26 | int i,j; 27 | int X[100]; 28 | printf("Please input Y, Z, D (Y and Z belongs to [0, 2147483647] and D belongs to [1, 46340]), end with '0 0 0': \n"); 29 | scanf("%d %d %d", &Y, &Z, &D); 30 | for (i = 0; Y; ++i) { 31 | X[i] = count(Y, Z, D); 32 | scanf("%d %d %d", &Y, &Z, &D); 33 | } 34 | printf("X:\n"); 35 | for (j = 0; j < i; ++j) 36 | { 37 | printf("%d\n", X[j]); 38 | } 39 | return 0; 40 | } 41 | 42 | -------------------------------------------------------------------------------- /AlgorithmsAnalysis/AlgorithmLab2.c: -------------------------------------------------------------------------------- 1 | // 2 | // AlgorithmLab2.c 3 | // Requirements: 4 | // Bag proble: 5 | // Given bag volume and the price and volume of n products (product cannot 6 | // be splited), computing the maximum value of the products the bag can hold. 7 | // 8 | // Created by Tangrizzly on 16/11/2017. 9 | // Copyright © 2017 Tangrizzly. All rights reserved. 10 | // 11 | 12 | #include "stdio.h" 13 | #define max(a,b) ((a)>(b))?(a):(b) 14 | 15 | int getMaximumValue(int n, int w, int weight[], int value[]) { 16 | int Vm[w+1]; 17 | for (int i=0; i < w+1; i++) { 18 | Vm[i]=0; 19 | } 20 | for (int i = 0; i < n; i++) { 21 | for (int j=w; j>=weight[i]; j--) { 22 | Vm[j] = max(Vm[j], Vm[j-weight[i]]+value[i]); 23 | } 24 | } 25 | return Vm[w]; 26 | } 27 | 28 | int main() { 29 | int n, w, M[100]; 30 | int i, j; 31 | int weight[1001]={0}, value[1001]={0}; 32 | printf("Please input n, w (0 <= n <= 1000 && 0 <= w <= 5000): \n"); 33 | scanf("%d %d", &n, &w); 34 | for (i = 0; n!=-1; ++i) { 35 | if (n<0||n>1000||w<0||w>5000) { 36 | printf("Overflowing, please retry."); 37 | continue; 38 | } 39 | for (int i = 0; i < n; i++) { 40 | scanf("%d", &value[i]); 41 | if (value[i]<0||value[i]>1000) { 42 | i--; 43 | } 44 | } 45 | for (int i = 0; i < n; i++) { 46 | scanf("%d", &weight[i]); 47 | if (weight[i]<0||weight[i]>w) { 48 | i--; 49 | } 50 | } 51 | M[i] = getMaximumValue(n, w, weight, value); 52 | printf("Please input n, w (0 <= n <= 1000 && 0 <= w <= 5000): \n"); 53 | scanf("%d %d", &n, &w); 54 | } 55 | printf("Maximum values:\n"); 56 | for (j = 0; j < i; ++j) 57 | { 58 | printf("%d\n", M[j]); 59 | } 60 | return 0; 61 | } 62 | -------------------------------------------------------------------------------- /AlgorithmsAnalysis/AlgorithmLab3.c: -------------------------------------------------------------------------------- 1 | // 2 | // AlgorithmLab3.c 3 | // Requirements: 4 | // m people pick n toys with no repeatitions and each of toys shares the value 5 | // with v1, v2,..., vn (m<=n<=1000, 0<=vi<=1000). When a person picks a toy, 6 | // he/she does not want others to get more then he/she does. Thus we need to 7 | // split toys to n groups with the smallest price difference. 8 | // input: n, m 9 | // output: price difference 10 | // 11 | // Created by Tangrizzly on 16/11/2017. 12 | // Copyright © 2017 Tangrizzly. All rights reserved. 13 | // 14 | 15 | #include "stdio.h" 16 | #include "stdlib.h" 17 | 18 | void swap(int *a, int *b) { 19 | int temp = *a; 20 | *a = *b; 21 | *b = temp; 22 | } 23 | 24 | //buble sort 25 | int split(int n, int m, int v[]) { 26 | int g[m], i, j, k, d=0, flag; 27 | for (i=0; i=0; j--) { 31 | for (i=0; i v[i+1]) { 33 | swap(&v[i], &v[i+1]); 34 | } 35 | } 36 | for (k=0, flag=0; kg[k]) { 38 | flag = k; 39 | } 40 | } 41 | g[flag] += v[j]; 42 | } 43 | for (i=0; i1000||m>n) { 55 | printf("Wrong number. Please retry.\n"); 56 | return 1; 57 | } 58 | for (int i = 0; i < n; i++) { 59 | scanf("%d", &v[i]); 60 | } 61 | printf("the smallest price difference is:%d\n", split(n, m, v)); 62 | return 0; 63 | } 64 | -------------------------------------------------------------------------------- /AlgorithmsAnalysis/上机实验.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/AlgorithmsAnalysis/上机实验.pdf -------------------------------------------------------------------------------- /AlgorithmsAnalysis/算法1实验报告.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/AlgorithmsAnalysis/算法1实验报告.docx -------------------------------------------------------------------------------- /AlgorithmsAnalysis/算法2实验报告.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/AlgorithmsAnalysis/算法2实验报告.docx -------------------------------------------------------------------------------- /AlgorithmsAnalysis/算法3实验报告.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/AlgorithmsAnalysis/算法3实验报告.docx -------------------------------------------------------------------------------- /AlgorithmsAnalysis/算法4实验报告.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/AlgorithmsAnalysis/算法4实验报告.docx -------------------------------------------------------------------------------- /DataStructure/1.txt: -------------------------------------------------------------------------------- 1 | 34 55 86 43 23 33 14 56 79 -1 -------------------------------------------------------------------------------- /DataStructure/2.txt: -------------------------------------------------------------------------------- 1 | 5+(4-2)*3# -------------------------------------------------------------------------------- /DataStructure/4.txt: -------------------------------------------------------------------------------- 1 | Every step toward the goal of justice requires sacrifice, suffering, and struggle; the tireless exertions and passionate concern of dedicated individuals. 2 | -------------------------------------------------------------------------------- /DataStructure/5.txt: -------------------------------------------------------------------------------- 1 | abcdef#abbccddfefad## -------------------------------------------------------------------------------- /DataStructure/6.1.txt: -------------------------------------------------------------------------------- 1 | Natural language understanding based spoken dialog system has been a popular topic in the past years of artificial intelligence renaissance. Many of those influential systems include a question answering module, e.g. Apple’s Siri, IBM’s Watson and Amazon’s Echo. In this paper, we address the Question Answering (QA) module in those spoken QA systems. We treat the QA from a text matching and selection perspective. IBM’s Watson system [1] is a classical example of the traditional way of doing Question Answering (QA). In this work we utilize a deep learning framework to accomplish the answer selection which is a key step in the QA task. Hence QA is studied from an answer matching and selection perspective. Given a question q and an answer candidate pool {a1, a2, ..., as} for that question (s is the pool size), the goal is to find the best answer candidate ak, 1 ≤ k ≤ s . If the selected answer ak is inside the ground truth set (one question could have more than one correct answer) of question q , the question q is considered to be answered correctly, otherwise it is answered incorrectly. From the definition, the QA problem can be regarded as a binary classification problem. For each question, for each answer candidate, it may be appropriate or not. In order to find the best pair, we need a metric to measure the matching degree of each QA pair so that the QA pair with highest metric value will be chosen. -------------------------------------------------------------------------------- /DataStructure/6.3.txt: -------------------------------------------------------------------------------- 1 | The first baseline system is a bag-of-words model. Step one is to train a word embedding by [2]. This word embedding pro- vides the word vector for each token in the question and its candidate answer. From these, the baseline system produces the idf-weighted sum of word vectors for the question and for all of its answer candidates. This produces a vector represen- tation for the question and each answer candidate. The last step is to calculate the cosine similarity between each ques- tion/candidate pair. The pair with highest cosine similarity is returned as the answer. The second baseline is an information retrieval (IR) baseline. The state-of-the-art weighted depen- dency model (WD) [3, 4] is used. The WD model employs a weighted combination of term-based and term proximity- based ranking features to score each candidate answer. Ex- ample features include counts of question bigrams in ordered and unordered windows of different sizes in each candidate answer, in addition to simple unigram counts. The basic idea is that important bigrams or unigrams in the question should receive higher weights when their frequencies are computed. Thus, the feature weights are assigned in accordance to the importance of the question unigrams or bigrams that they are defined over, where the importance factor is learned as part of the model training process. Row 1 and 2 (first column Idx) of Table 2 are the baseline system results. -------------------------------------------------------------------------------- /DataStructure/DS实验报告.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/DataStructure/DS实验报告.pdf -------------------------------------------------------------------------------- /DataStructure/DataStructure3.c: -------------------------------------------------------------------------------- 1 | #include "stdlib.h" 2 | #include "stdio.h" 3 | #include 4 | 5 | typedef struct node//定义队列节点 6 | { 7 | char data; 8 | struct node *next; 9 | }Qnode,*Qlink; 10 | typedef struct{ 11 | Qnode *front,*rear; 12 | }linkqueue; 13 | 14 | void Lcreatqueue(linkqueue *q)//创建带头节点的队列 15 | { 16 | q->front=q->rear=(Qlink)malloc(sizeof(Qnode)); 17 | q->front->next=NULL; 18 | } 19 | 20 | int Lemptyqueue(linkqueue *q){ 21 | return(q->front==q->rear); 22 | } 23 | 24 | void Lenqueue(linkqueue *q, char e){ 25 | Qlink p=(Qlink)malloc(sizeof(Qnode)); 26 | p->data=e; 27 | q->rear->next=p; 28 | q->rear=p; 29 | p->next=NULL; 30 | } 31 | 32 | int Ldequeue(linkqueue *q,char *pe){ 33 | Qlink p; 34 | if(Lemptyqueue(q)) return(-1); 35 | p=q->front; 36 | q->front=p->next; 37 | free(p); 38 | *pe=q->front->data; 39 | return 0; 40 | } 41 | 42 | int start()//判断是否开始 43 | { 44 | int d; 45 | do{ 46 | printf("是否开始入队(1/0)?"); 47 | scanf("%d",&d); 48 | if (!d) { 49 | printf("\n结束程序"); 50 | return 0; 51 | } 52 | else if(d) return 1; 53 | else printf("\n错误\n"); 54 | }while(d!=0&&d!=1); 55 | return 0; 56 | } 57 | 58 | 59 | int main(){ 60 | linkqueue Q; 61 | Lcreatqueue(&Q); 62 | char c; 63 | while(start()){ 64 | printf("\n开始输入字符:\n"); 65 | do{ 66 | c=getchar(); 67 | }while(c=='\n'); 68 | Lenqueue(&Q,c); 69 | while(c!='@'){ 70 | if(c=='0'){ 71 | Ldequeue(&Q,&c); 72 | printf("出队:%c\n",c); 73 | } 74 | do{ 75 | c=getchar(); 76 | }while(c=='\n'); 77 | Lenqueue(&Q,c); 78 | } 79 | printf("所有元素出队:"); 80 | while(Ldequeue(&Q,&c)==0){ 81 | printf("%c ",c); 82 | } 83 | } 84 | return 0; 85 | } 86 | -------------------------------------------------------------------------------- /Database System/图1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Database System/图1.png -------------------------------------------------------------------------------- /Database System/图10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Database System/图10.png -------------------------------------------------------------------------------- /Database System/图11-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Database System/图11-2.png -------------------------------------------------------------------------------- /Database System/图11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Database System/图11.png -------------------------------------------------------------------------------- /Database System/图12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Database System/图12.png -------------------------------------------------------------------------------- /Database System/图13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Database System/图13.png -------------------------------------------------------------------------------- /Database System/图14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Database System/图14.png -------------------------------------------------------------------------------- /Database System/图15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Database System/图15.png -------------------------------------------------------------------------------- /Database System/图16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Database System/图16.png -------------------------------------------------------------------------------- /Database System/图18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Database System/图18.png -------------------------------------------------------------------------------- /Database System/图19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Database System/图19.png -------------------------------------------------------------------------------- /Database System/图2.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Database System/图2.jpeg -------------------------------------------------------------------------------- /Database System/图20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Database System/图20.png -------------------------------------------------------------------------------- /Database System/图21.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Database System/图21.png -------------------------------------------------------------------------------- /Database System/图22.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Database System/图22.png -------------------------------------------------------------------------------- /Database System/图24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Database System/图24.png -------------------------------------------------------------------------------- /Database System/图25.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Database System/图25.png -------------------------------------------------------------------------------- /Database System/图26.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Database System/图26.png -------------------------------------------------------------------------------- /Database System/图27.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Database System/图27.png -------------------------------------------------------------------------------- /Database System/图28.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Database System/图28.png -------------------------------------------------------------------------------- /Database System/图29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Database System/图29.png -------------------------------------------------------------------------------- /Database System/图3-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Database System/图3-2.png -------------------------------------------------------------------------------- /Database System/图3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Database System/图3.png -------------------------------------------------------------------------------- /Database System/图30.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Database System/图30.png -------------------------------------------------------------------------------- /Database System/图4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Database System/图4.png -------------------------------------------------------------------------------- /Database System/图5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Database System/图5.png -------------------------------------------------------------------------------- /Database System/图6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Database System/图6.png -------------------------------------------------------------------------------- /Database System/图7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Database System/图7.png -------------------------------------------------------------------------------- /Database System/图8-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Database System/图8-2.png -------------------------------------------------------------------------------- /Database System/图8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Database System/图8.png -------------------------------------------------------------------------------- /Database System/图9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Database System/图9.png -------------------------------------------------------------------------------- /Database System/实验报告.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Database System/实验报告.pdf -------------------------------------------------------------------------------- /Database System/数据库原理实验.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Database System/数据库原理实验.pdf -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/Summary.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/Summary.pdf -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/.idea/dictionaries/Tangrizzly.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/.idea/inspectionProfiles/Project_Default.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 36 | -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/TheSolitareGame.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/10_of_clubs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/10_of_clubs.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/10_of_diamonds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/10_of_diamonds.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/10_of_hearts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/10_of_hearts.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/10_of_spades.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/10_of_spades.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/11_of_clubs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/11_of_clubs.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/11_of_diamonds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/11_of_diamonds.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/11_of_hearts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/11_of_hearts.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/11_of_spades.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/11_of_spades.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/12_of_clubs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/12_of_clubs.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/12_of_diamonds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/12_of_diamonds.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/12_of_hearts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/12_of_hearts.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/12_of_spades.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/12_of_spades.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/13_of_clubs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/13_of_clubs.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/13_of_diamonds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/13_of_diamonds.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/13_of_hearts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/13_of_hearts.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/13_of_spades.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/13_of_spades.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/1_of_clubs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/1_of_clubs.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/1_of_diamonds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/1_of_diamonds.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/1_of_hearts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/1_of_hearts.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/1_of_spades.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/1_of_spades.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/1_of_spades2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/1_of_spades2.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/2_of_clubs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/2_of_clubs.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/2_of_diamonds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/2_of_diamonds.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/2_of_hearts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/2_of_hearts.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/2_of_spades.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/2_of_spades.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/3_of_clubs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/3_of_clubs.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/3_of_diamonds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/3_of_diamonds.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/3_of_hearts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/3_of_hearts.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/3_of_spades.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/3_of_spades.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/4_of_clubs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/4_of_clubs.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/4_of_diamonds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/4_of_diamonds.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/4_of_hearts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/4_of_hearts.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/4_of_spades.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/4_of_spades.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/5_of_clubs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/5_of_clubs.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/5_of_diamonds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/5_of_diamonds.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/5_of_hearts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/5_of_hearts.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/5_of_spades.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/5_of_spades.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/6_of_clubs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/6_of_clubs.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/6_of_diamonds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/6_of_diamonds.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/6_of_hearts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/6_of_hearts.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/6_of_spades.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/6_of_spades.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/7_of_clubs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/7_of_clubs.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/7_of_diamonds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/7_of_diamonds.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/7_of_hearts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/7_of_hearts.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/7_of_spades.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/7_of_spades.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/8_of_clubs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/8_of_clubs.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/8_of_diamonds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/8_of_diamonds.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/8_of_hearts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/8_of_hearts.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/8_of_spades.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/8_of_spades.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/9_of_clubs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/9_of_clubs.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/9_of_diamonds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/9_of_diamonds.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/9_of_hearts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/9_of_hearts.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/9_of_spades.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/9_of_spades.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/back.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/black_joker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/black_joker.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/empty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/empty.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/red_joker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/red_joker.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/win.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/PNG-cards/win.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/card/Card$CardShape.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/card/Card$CardShape.class -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/card/Card.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/card/Card.class -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/card/CardPile.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/card/CardPile.class -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/card/DeckPile.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/card/DeckPile.class -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/card/DiscardPile.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/card/DiscardPile.class -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/card/Image.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/card/Image.class -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/card/MoveCardPile.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/card/MoveCardPile.class -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/card/SuitPile.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/card/SuitPile.class -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/card/TablePile.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/card/TablePile.class -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/game/Game.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/game/Game.class -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/game/Solitaire.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/game/Solitaire.class -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/game/SolitaireGame.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/out/production/TheSolitareGame/game/SolitaireGame.class -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/10_of_clubs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/10_of_clubs.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/10_of_diamonds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/10_of_diamonds.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/10_of_hearts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/10_of_hearts.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/10_of_spades.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/10_of_spades.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/11_of_clubs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/11_of_clubs.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/11_of_diamonds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/11_of_diamonds.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/11_of_hearts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/11_of_hearts.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/11_of_spades.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/11_of_spades.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/12_of_clubs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/12_of_clubs.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/12_of_diamonds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/12_of_diamonds.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/12_of_hearts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/12_of_hearts.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/12_of_spades.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/12_of_spades.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/13_of_clubs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/13_of_clubs.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/13_of_diamonds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/13_of_diamonds.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/13_of_hearts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/13_of_hearts.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/13_of_spades.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/13_of_spades.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/1_of_clubs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/1_of_clubs.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/1_of_diamonds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/1_of_diamonds.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/1_of_hearts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/1_of_hearts.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/1_of_spades.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/1_of_spades.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/1_of_spades2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/1_of_spades2.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/2_of_clubs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/2_of_clubs.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/2_of_diamonds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/2_of_diamonds.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/2_of_hearts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/2_of_hearts.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/2_of_spades.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/2_of_spades.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/3_of_clubs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/3_of_clubs.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/3_of_diamonds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/3_of_diamonds.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/3_of_hearts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/3_of_hearts.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/3_of_spades.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/3_of_spades.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/4_of_clubs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/4_of_clubs.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/4_of_diamonds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/4_of_diamonds.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/4_of_hearts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/4_of_hearts.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/4_of_spades.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/4_of_spades.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/5_of_clubs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/5_of_clubs.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/5_of_diamonds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/5_of_diamonds.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/5_of_hearts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/5_of_hearts.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/5_of_spades.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/5_of_spades.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/6_of_clubs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/6_of_clubs.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/6_of_diamonds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/6_of_diamonds.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/6_of_hearts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/6_of_hearts.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/6_of_spades.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/6_of_spades.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/7_of_clubs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/7_of_clubs.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/7_of_diamonds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/7_of_diamonds.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/7_of_hearts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/7_of_hearts.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/7_of_spades.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/7_of_spades.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/8_of_clubs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/8_of_clubs.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/8_of_diamonds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/8_of_diamonds.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/8_of_hearts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/8_of_hearts.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/8_of_spades.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/8_of_spades.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/9_of_clubs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/9_of_clubs.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/9_of_diamonds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/9_of_diamonds.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/9_of_hearts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/9_of_hearts.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/9_of_spades.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/9_of_spades.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/back.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/black_joker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/black_joker.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/empty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/empty.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/red_joker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/red_joker.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/win.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/PNG-cards/win.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/card/DeckPile.java: -------------------------------------------------------------------------------- 1 | package card; 2 | 3 | /** 4 | * @author Tangrizzly 5 | * @Create 20/01/2018 6 | */ 7 | 8 | public class DeckPile extends CardPile { 9 | 10 | public DeckPile (int x, int y) { 11 | super(x, y); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/card/DiscardPile.java: -------------------------------------------------------------------------------- 1 | package card; 2 | 3 | /** 4 | * @author Tangrizzly 5 | * @Create 20/01/2018 6 | */ 7 | 8 | public class DiscardPile extends CardPile { 9 | 10 | public DiscardPile (int x, int y) { 11 | super (x, y); 12 | } 13 | 14 | public void addCard (Object card){ 15 | Card cards = (Card)card; 16 | if (!(cards.isFront())) { 17 | cards.setFaceup(true); 18 | } 19 | thePile.push(cards); 20 | } 21 | 22 | } -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/card/Image.java: -------------------------------------------------------------------------------- 1 | package card; 2 | 3 | import javax.imageio.ImageIO; 4 | import java.awt.image.BufferedImage; 5 | import java.awt.image.DataBufferInt; 6 | import java.awt.image.PixelGrabber; 7 | import java.io.IOException; 8 | import java.io.InputStream; 9 | 10 | /** 11 | * @author Tangrizzly 12 | * @Create 20/01/2018 13 | */ 14 | 15 | public class Image { 16 | 17 | private BufferedImage bufferImage; 18 | private int width; 19 | private int height; 20 | 21 | final private int[] pixels; 22 | final private int[] clear; 23 | 24 | public Image(final String fileName) { 25 | try { 26 | System.out.println(fileName); 27 | InputStream is = this.getClass().getResourceAsStream(fileName); 28 | BufferedImage tmpImage = ImageIO.read(is); 29 | width = tmpImage.getWidth(null); 30 | height = tmpImage.getHeight(null); 31 | clear = new int[width * height]; 32 | bufferImage = new BufferedImage(width, height, 33 | BufferedImage.TYPE_INT_ARGB); 34 | pixels = ((DataBufferInt) bufferImage.getRaster().getDataBuffer()) 35 | .getData(); 36 | PixelGrabber pgr = new PixelGrabber(tmpImage, 0, 0, width, height, 37 | pixels, 0, width); 38 | try { 39 | pgr.grabPixels(); 40 | } catch (InterruptedException ex) { 41 | } 42 | } catch (IOException ex) { 43 | throw new RuntimeException(ex); 44 | } 45 | } 46 | 47 | public BufferedImage getBufferedImage() { 48 | return bufferImage; 49 | } 50 | 51 | public int getHeight() { 52 | return height; 53 | } 54 | 55 | public void setHeight(int height) { 56 | this.height = height; 57 | } 58 | 59 | public int getWidth() { 60 | return width; 61 | } 62 | 63 | public void setWidth(int width) { 64 | this.width = width; 65 | } 66 | 67 | } -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/card/SuitPile.java: -------------------------------------------------------------------------------- 1 | package card; 2 | 3 | /** 4 | * @author Tangrizzly 5 | * @Create 20/01/2018 6 | */ 7 | 8 | public class SuitPile extends CardPile { 9 | 10 | public SuitPile (int x, int y) { super(x, y); } 11 | 12 | public boolean isCanAdd(Card card) { 13 | if (isEmpty()) { 14 | return card.getNum() == 0; 15 | } 16 | Card topCard = top(); 17 | return (card.getType() == topCard.getType()) && (card.getNum() == topCard.getNum() + 1); 18 | } 19 | 20 | } -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/TheSolitareGame/src/game/SolitaireGame.java: -------------------------------------------------------------------------------- 1 | package game; 2 | 3 | import javax.swing.*; 4 | 5 | /** 6 | * @author Tangrizzly 7 | * @Create 20/01/2018 8 | */ 9 | 10 | public class SolitaireGame extends JFrame { 11 | 12 | public SolitaireGame(){ 13 | setSize(900, 700); 14 | setTitle("Solitaire"); 15 | setLayout(null); 16 | setDefaultCloseOperation(DISPOSE_ON_CLOSE); 17 | setVisible(true); 18 | Solitaire sp = new Solitaire(); 19 | add(sp); 20 | } 21 | public static void main(String[] args) { 22 | new SolitaireGame(); 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/World of Warcraft/code/arm.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // arm.hpp 3 | // lab6_2_2 4 | // 5 | // Created by Tangrizzly on 14/01/2018. 6 | // Copyright © 2018 Tangrizzly. All rights reserved. 7 | // 8 | 9 | #ifndef arm_hpp 10 | #define arm_hpp 11 | 12 | #include 13 | using namespace std; 14 | 15 | class Warrior; 16 | enum armType {sword = 0,bomb,arrow}; 17 | 18 | class Arm { 19 | protected: 20 | armType type; 21 | int attack_point; 22 | public: 23 | Arm(armType _type):type(_type) { 24 | attack_point = 0; 25 | } 26 | void setAttackPoint(int p) { 27 | attack_point = p; 28 | } 29 | virtual int attack(Warrior* itself, Warrior* enemy) {return 0;} 30 | virtual bool exist() {return 1;} 31 | virtual string getType() = 0; 32 | int getTypeNumber() {return type;} 33 | const int getAttackPoint() {return attack_point;} 34 | virtual int print() {return 0;}; 35 | }; 36 | 37 | #endif /* arm_hpp */ 38 | -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/World of Warcraft/code/city.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // city.hpp 3 | // lab6_2_2 4 | // 5 | // Created by Tangrizzly on 19/01/2018. 6 | // Copyright © 2018 Tangrizzly. All rights reserved. 7 | // 8 | 9 | #ifndef city_hpp 10 | #define city_hpp 11 | 12 | #include "cwarrior.hpp" 13 | 14 | enum Flag {blue, red, none}; 15 | 16 | class City { 17 | private: 18 | int* life; 19 | Flag flag; 20 | int red_combo; 21 | int blue_combo; 22 | public: 23 | Warrior* warrior; 24 | Warrior* enemyWarrior; 25 | City(Warrior* w, Warrior* enemy_w, int* _life):warrior(w), enemyWarrior(enemy_w), life(_life) { 26 | flag = none; 27 | red_combo = 0; 28 | blue_combo = 0; 29 | } 30 | int warriorNumber() { 31 | if (warrior!=NULL && enemyWarrior!=NULL) { 32 | return 2; 33 | } else if (warrior==NULL && enemyWarrior==NULL) { 34 | return 0; 35 | } else { 36 | return 1; 37 | } 38 | } 39 | int getlife() {return *life;} 40 | void setlife() {*life += 5;} 41 | void resetLife() {*life = 0;} 42 | Flag getFlag() {return flag;} 43 | void failed(Flag type) { 44 | if (type == red) { 45 | red_combo = 0; 46 | } else { 47 | blue_combo = 0; 48 | } 49 | } 50 | void success(Flag type, string stype, Clock* htime, int city) { 51 | if (type == red) { 52 | red_combo++; 53 | if (red_combo >= 2) { 54 | flag = red; 55 | cout << *htime << ' ' << stype << " flag raised in city " << city << endl; 56 | } 57 | } else { 58 | blue_combo++; 59 | if ((blue_combo >= 2)) { 60 | flag = blue; 61 | } 62 | } 63 | } 64 | }; 65 | 66 | #endif /* city_hpp */ 67 | -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/World of Warcraft/code/clock.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // clock.hpp 3 | // lab6_2_2 4 | // 5 | // Created by Tangrizzly on 14/01/2018. 6 | // Copyright © 2018 Tangrizzly. All rights reserved. 7 | // 8 | 9 | #ifndef clock_h 10 | #define clock_h 11 | 12 | class Clock { 13 | private: 14 | int hours; 15 | int minutes; 16 | public: 17 | Clock() { 18 | hours = 0; 19 | minutes = 0; 20 | } 21 | void click_clock(int min); 22 | const int getHours() {return hours;} 23 | const int getMinutes() {return minutes;} 24 | const int getTotalTime() {return hours*60 + minutes;} 25 | friend ostream& operator<< (ostream& out, Clock &clock); 26 | }; 27 | 28 | void Clock::click_clock(int min) { 29 | int total_min = minutes + min; 30 | minutes = total_min % 60; 31 | hours += total_min / 60; 32 | } 33 | 34 | ostream& operator<< (ostream &out, Clock &clock) { 35 | if (clock.hours/100) { 36 | out << clock.hours/100; 37 | } else { 38 | out << 0; 39 | } 40 | if (clock.hours/10%10) { 41 | out << clock.hours/10%10; 42 | } else { 43 | out << 0; 44 | } 45 | out << clock.hours%10; 46 | out << ':'; 47 | if (clock.minutes/10) { 48 | out << clock.minutes/10; 49 | } else { 50 | out << 0; 51 | } 52 | out << clock.minutes%10; 53 | return out; 54 | } 55 | 56 | #endif /* clock_h */ 57 | -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/World of Warcraft/code/headquarter.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // headquarter.hpp 3 | // lab6_2_2 4 | // 5 | // Created by Tangrizzly on 14/01/2018. 6 | // Copyright © 2018 Tangrizzly. All rights reserved. 7 | // 8 | 9 | #ifndef headquarter_hpp 10 | #define headquarter_hpp 11 | 12 | #include "city.hpp" 13 | 14 | class Headquarter { 15 | //用一个N维的数组记录每个城市中的英雄,当值为空时表示没有英雄 16 | protected: 17 | int warriorBornOrder[5]; 18 | int elements; 19 | int number; 20 | Clock* htime; 21 | City** cities; 22 | int arrived; 23 | void warriorBorn(Warrior **c, Warrior **enemy); 24 | virtual void born(Headquarter* enemyHeadquater) = 0; 25 | virtual Warrior* march(Headquarter* enemyHeadquater) = 0; 26 | virtual void shotArrow(Headquarter* enemyHeadquater) = 0; 27 | public: 28 | Headquarter(int _life, Clock* _htime, City** _cities):elements(_life), htime(_htime), cities(_cities){ 29 | arrived = 0; 30 | number = 1; 31 | } 32 | int scheduled(Headquarter* enemyHeadquater); 33 | virtual string getType() = 0; 34 | virtual Flag getFlagType() = 0; 35 | City** getcities() {return cities;} 36 | void getCityLife(City* city) { 37 | if (city->getlife() > 0) { 38 | elements += city->getlife(); 39 | city->resetLife(); 40 | } 41 | } 42 | void reportLife(); 43 | void award(Warrior* warrior) { 44 | if (elements > 8) { 45 | warrior->gethealed(8); 46 | elements -= 8; 47 | } 48 | } 49 | bool arrive() { 50 | arrived++; 51 | if (arrived >= 2) { 52 | return 1; 53 | } else { 54 | return 0; 55 | } 56 | } 57 | }; 58 | #endif /* headquarter_hpp */ 59 | -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/program/eight_queens.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // homework2_1.cpp 3 | // homework2_1 4 | // 5 | // Created by Tangrizzly on 25/11/2017. 6 | // Copyright © 2017 Tangrizzly. All rights reserved. 7 | // 8 | 9 | #include 10 | using namespace std; 11 | 12 | int num = 0; 13 | class queen { 14 | private: 15 | int row; 16 | int column; 17 | public: 18 | queen() {row = -1; column = -1;} 19 | void setqueen(int x, int y) {row = x; column = y;} 20 | int getcolumn() {return column;} 21 | int checkqueen(queen q[8]); 22 | }; 23 | 24 | int queen::checkqueen(queen q[8]) { 25 | if (row == 0) return 1; 26 | for (int k = 0; k <= row-1; k++) { 27 | //纵向只能有一枚皇后 28 | if (q[k].column == column) { 29 | return 0; 30 | } 31 | //右上至左下只能有一枚皇后 32 | if (q[k].row + q[k].column == row + column) { 33 | return 0; 34 | } 35 | //从左上至右下只能有一枚皇后 36 | if (q[k].row - q[k].column == row - column) { 37 | return 0; 38 | } 39 | } 40 | return 1; 41 | } 42 | 43 | void output(queen q[8]) { 44 | num++; 45 | cout<<"answer "< 10 | #include 11 | 12 | int m[8][8] = {0};//表示棋盘,初始为0,表示未放置皇后 13 | int num = 0;//解数目 14 | 15 | //对于棋盘前row-1行已放置好皇后 16 | //检查在第row行、第column列放置一枚皇后是否可行 17 | int check(int row,int column) 18 | { 19 | if(row==1) return 1; 20 | int i,j; 21 | //纵向只能有一枚皇后 22 | for(i=0;i<=row-2;i++) 23 | { 24 | if(m[i][column-1]==1) return 0; 25 | } 26 | //左上至右下只能有一枚皇后 27 | i = row-2; 28 | j = i-(row-column); 29 | while(i>=0&&j>=0) 30 | { 31 | if(m[i][j]==1) return 0; 32 | i--; 33 | j--; 34 | } 35 | //右上至左下只能有一枚皇后 36 | i = row-2; 37 | j = row+column-i-2; 38 | while(i>=0&&j<=7) 39 | { 40 | if(m[i][j]==1) return 0; 41 | i--; 42 | j++; 43 | } 44 | return 1; 45 | } 46 | 47 | //当已放置8枚皇后,为可行解时,输出棋盘 48 | void output() 49 | { 50 | int i,j; 51 | num++; 52 | printf("answer %d:\n",num); 53 | for(i=0;i<8;i++) 54 | { 55 | for(j=0;j<8;j++) printf("%d ",m[i][j]); 56 | printf("\n"); 57 | } 58 | } 59 | 60 | //采用递归函数实现八皇后回溯算法 61 | //该函数求解当棋盘前row-1行已放置好皇后,在第row行放置皇后 62 | void solve(int row) 63 | { 64 | int j; 65 | //考虑在第row行的各列放置皇后 66 | for (j=0;j<8;j++) 67 | { 68 | //在其中一列放置皇后 69 | m[row-1][j] = 1; 70 | //检查在该列放置皇后是否可行 71 | if (check(row,j+1)==1) 72 | { 73 | //若该列可放置皇后,且该列为最后一列,则找到一可行解,输出 74 | if(row==8) output(); 75 | //若该列可放置皇后,则向下一行,继续搜索、求解 76 | else solve(row+1); 77 | } 78 | //取出该列的皇后,进行回溯,在其他列放置皇后 79 | m[row-1][j] = 0; 80 | } 81 | } 82 | 83 | //主函数 84 | int main() 85 | { 86 | //求解八皇后问题 87 | solve(1); 88 | return 0; 89 | } 90 | -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/week1/homework1_2.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // main.cpp 3 | // A dice game: a player rolls two dice, if the total is seven he/she wins; 4 | // otherwise he/she loses 5 | // 6 | // Created by Tangrizzly on 15/11/2017. 7 | // Copyright © 2017 Tangrizzly. All rights reserved. 8 | // 9 | 10 | #include 11 | using namespace std; 12 | 13 | class Die{ 14 | int faceValue; 15 | int roll() { return rand()%6+1; } 16 | public: 17 | int getFaceValue() { faceValue = roll(); return faceValue; } 18 | }; 19 | 20 | class Dicegame{ 21 | Die die1, die2; 22 | public: 23 | void play(); 24 | }; 25 | 26 | void Dicegame::play(){ 27 | int n1 = die1.getFaceValue(); 28 | int n2 = die2.getFaceValue(); 29 | cout << "the number in the first roll: " << n1 << endl; 30 | cout << "the number in the second roll: " << n2 << endl; 31 | if (n1+n2 ==7) { 32 | cout << "the player wins." << endl; 33 | } else { 34 | cout << "the player loses." << endl; 35 | } 36 | } 37 | 38 | int main() { 39 | srand((unsigned)time(0)); 40 | Dicegame dicegame; 41 | dicegame.play(); 42 | return 0; 43 | } 44 | 45 | -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/week1/lab1_1.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | const float PI = 3.1416; 4 | int main() 5 | { 6 | int graphicType; 7 | float radius, a, b, perimeter; 8 | cout << "请选择图形的类型 (1-圆形 2-长方形 3-正方形) :"; 9 | cin >> graphicType; //在此行设置断点 10 | switch(graphicType) 11 | { 12 | case 1: 13 | cout << "请输入圆的半径为:"; 14 | cin >> radius; 15 | perimeter = PI * 2 * radius; 16 | cout<<"圆"<< radius <<"的周长为:"<< perimeter <> a >> b; 21 | perimeter = 2*(a+b); 22 | cout<<"矩形"<< a <<":"<> a; 27 | perimeter = a * 4; 28 | cout<<"正方形"<< a <<"的周长为:"<< perimeter < 2 | using namespace std;int main(){ 3 | int L=2, A=0, G=0, E=1; 4 | for(;L<10;L++){ 5 | for(A=0;A<10;A++){ 6 | if(L==A||A==E) {A++;} 7 | for(G=0;G<10;G++){ 8 | if(A==G||G==E||G==L) G++; 9 | if((L*1000+A*100+G*10+E)/L==E*1000+G*100+A*10+L){ 10 | cout<<"EGAL="< 12 | using namespace std; 13 | 14 | //define datatype and the structure of the linknode 15 | typedef int datatype; 16 | typedef struct node{ 17 | datatype number; 18 | struct node *next; 19 | }linknode,*link; 20 | 21 | //creat a circular linked list 22 | link CreatList(int m, int n){ 23 | link H,p,r; 24 | int i = 1; 25 | H = new linknode; 26 | H->number = i; 27 | r = H; 28 | while (i < m) { 29 | i++; 30 | p = new linknode; 31 | p->number = i; 32 | r->next = p; 33 | r = p; 34 | } 35 | r->next = H; 36 | return r; //r is the last person 37 | } 38 | 39 | //ouput the number of the person counting n 40 | void Counting(link r, int n){ 41 | int i=1; 42 | link q = r, p = r->next; 43 | FILE *f = fopen("01.out", "aw"); 44 | while (p != q) { 45 | if (i%n==0) { 46 | q->next = p->next; 47 | fprintf(f, "%d, ", p->number); 48 | delete(p); 49 | p = q->next; 50 | } else { 51 | q = p; 52 | p = p->next; 53 | } 54 | i++; 55 | } 56 | fprintf(f, "%d\n", p->number); 57 | fclose(f); 58 | } 59 | 60 | void PKbyNo(int m, int n){ 61 | link r = CreatList(m, n); 62 | Counting(r, n); 63 | } 64 | 65 | int main() { 66 | int m, n; 67 | FILE *f=fopen("01.in","r"); 68 | if (f == NULL) { 69 | cout << "Failed" << endl; 70 | exit (-1); 71 | } 72 | while (!feof(f)) { 73 | fscanf(f, "%d %d", &m, &n); 74 | PKbyNo(m, n); 75 | } 76 | fclose(f); 77 | return 0; 78 | } 79 | -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/week1/lab1_4.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // main.cpp 3 | // lab1_4 4 | // four people count numbers. each of them says a words and three of them are true. find who says the number one. 5 | // A:not me. B: is C. C: is B. D: he is lying. 6 | // Created by Tangrizzly on 15/11/2017. 7 | // Copyright © 2017 Tangrizzly. All rights reserved. 8 | // a=0,b=0,c=1 9 | 10 | #include 11 | using namespace std; 12 | 13 | int main() { 14 | int a = 0, b = 0, c = 0; 15 | int i=1; 16 | for (a=0; a<2&&i; a++) { 17 | for (b=0; b<2&&i; b++) { 18 | for (c=0; c<2&&i; c++) { 19 | if((!a)+(c)+(b)+(!b)==3 && a+b+c<=1) 20 | i=0; 21 | } 22 | } 23 | } 24 | if (a==2) 25 | printf("A\n"); 26 | else if (b==2) 27 | printf("B\n"); 28 | else if (c==2) 29 | printf("C\n"); 30 | else printf("D\n"); 31 | return 0; 32 | } 33 | -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/week2/homework2.md: -------------------------------------------------------------------------------- 1 | #### 作业1:八皇后面向对象问题 2 | ![class list](homework2_1/class list.png) 3 | ![class queen](homework2_1/class queen.png) 4 | #####输出:92个答案 5 | ![output1](homework2_1/output1.png) 6 | ![output2](homework2_1/output2.png) 7 | #### 作业2:语法练习 8 | ![homework2_2](homework2_2.png) -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/week2/homework2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/week2/homework2.pdf -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/week2/homework2_1/class list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/week2/homework2_1/class list.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/week2/homework2_1/class queen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/week2/homework2_1/class queen.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/week2/homework2_1/homework2_1.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // homework2_1.cpp 3 | // homework2_1 4 | // 5 | // Created by Tangrizzly on 25/11/2017. 6 | // Copyright © 2017 Tangrizzly. All rights reserved. 7 | // 8 | 9 | #include 10 | using namespace std; 11 | 12 | int num = 0; 13 | class queen { 14 | private: 15 | int row; 16 | int column; 17 | public: 18 | queen() {row = -1; column = -1;} 19 | void setqueen(int x, int y) {row = x; column = y;} 20 | int getcolumn() {return column;} 21 | int checkqueen(queen q[8]); 22 | }; 23 | 24 | int queen::checkqueen(queen q[8]) { 25 | if (row == 0) return 1; 26 | for (int k = 0; k <= row-1; k++) { 27 | //纵向只能有一枚皇后 28 | if (q[k].column == column) { 29 | return 0; 30 | } 31 | //右上至左下只能有一枚皇后 32 | if (q[k].row + q[k].column == row + column) { 33 | return 0; 34 | } 35 | //从左上至右下只能有一枚皇后 36 | if (q[k].row - q[k].column == row - column) { 37 | return 0; 38 | } 39 | } 40 | return 1; 41 | } 42 | 43 | void output(queen q[8]) { 44 | num++; 45 | cout<<"answer "< 10 | #include 11 | using namespace std; 12 | 13 | class Student { 14 | private: 15 | string m_strName; 16 | public: 17 | Student() {cout<<"constructing Student class."<setName("Alice"); 29 | Student *stu2 = new Student("Bob"); 30 | cout<<"person1's name is "<getName()<getName()< 10 | #include 11 | using namespace std; 12 | 13 | class CRectangle{ 14 | private: 15 | int x, y; //coordinates of the lower left corner 16 | int a, b; //the length on x, and the length on y 17 | int perimeter; 18 | int square; 19 | int distance; 20 | public: 21 | friend void getDistance(CRectangle &); 22 | CRectangle(int x, int y, int a, int b); 23 | ~CRectangle(){cout << "Deleting a class CRectangle." << endl;} 24 | void changeCoordinates(int x, int y){this->x = x; this->y= y;} 25 | void changeLength(int a, int b){this->a = a; this->b = b;} 26 | void outputAttributes(); 27 | void outputPmAndSq(); 28 | }; 29 | 30 | CRectangle::CRectangle(int x, int y, int a, int b){ 31 | cout << "Creating a class CRectangle." << endl; 32 | this->x = x; 33 | this->y = y; 34 | this->a = a; 35 | this->b = b; 36 | } 37 | 38 | void CRectangle::outputAttributes(){ 39 | cout << "x=" << x << ", y=" << y << endl; 40 | cout << "a=" << a << ", b=" << b << endl; 41 | } 42 | 43 | void CRectangle::outputPmAndSq(){ 44 | perimeter = 2*a + 2*b; 45 | square = a*b; 46 | cout << "Perimeter=" << perimeter << endl; 47 | cout << "Square=" << square << endl; 48 | } 49 | 50 | void getDistance(CRectangle & rect){ 51 | rect.distance = sqrt((double)((rect.x+rect.a/2)^2+(rect.y+rect.b/2)^2)); 52 | cout << "Distance=" << rect.distance << endl; 53 | } 54 | 55 | int main() { 56 | CRectangle *rect = new CRectangle(100, 50, 1200, 700); 57 | rect->changeCoordinates(100, 50); 58 | rect->changeLength(1200, 700); 59 | rect->outputAttributes(); 60 | rect->outputPmAndSq(); 61 | getDistance(*rect); 62 | delete rect; 63 | return 0; 64 | } 65 | -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/week2/lab2_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/week2/lab2_1.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/week2/lab2_2.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // lab2_2.cpp 3 | // lab2_2 4 | // 5 | // Created by Tangrizzly on 21/11/2017. 6 | // Copyright © 2017 Tangrizzly. All rights reserved. 7 | // 8 | 9 | #include 10 | using namespace std; 11 | 12 | class Cargo{ 13 | public: 14 | Cargo(int number, char* name, int weight, int price); 15 | Cargo(const Cargo &C); 16 | ~Cargo(); 17 | static int SumOfBoxes; 18 | static int SumOfWeight; 19 | static void add(int weight); 20 | static void sell(int weight); 21 | private: 22 | int number; 23 | char* name; 24 | int weight; 25 | int price; 26 | }; 27 | int Cargo::SumOfWeight = 0; 28 | int Cargo::SumOfBoxes = 0; 29 | 30 | void Cargo::add(int weight){ 31 | SumOfBoxes++; 32 | SumOfWeight += weight; 33 | cout << SumOfBoxes << " boxes of Cargo weigh " << SumOfWeight << "." << endl; 34 | } 35 | 36 | void Cargo::sell(int weight){ 37 | SumOfBoxes--; 38 | SumOfWeight -= weight; 39 | cout << SumOfBoxes << " boxes of Cargo weigh " << SumOfWeight << "." << endl; 40 | } 41 | 42 | Cargo::Cargo(int number, char* name, int weight, int price) { 43 | cout << "buying a box of cargo." << endl; 44 | this->number = number; 45 | this->name=new char[strlen(name)+1]; 46 | if(this->name) 47 | strcpy(this->name,name); 48 | this->weight = weight; 49 | this->price = price; 50 | add(weight); 51 | } 52 | 53 | Cargo::Cargo(const Cargo &C) { 54 | cout << "buying a same box of cargo." << endl; 55 | number = C.number; 56 | //name = C.name; 57 | name=new char[strlen(C.name)+1]; 58 | if(name) 59 | strcpy(name,C.name); 60 | weight = C.weight; 61 | price = C.price; 62 | add(weight); 63 | } 64 | 65 | Cargo::~Cargo() { 66 | cout << "selling a box of cargo." < 10 | using namespace std; 11 | class Integer { 12 | private: 13 | int _num; 14 | public: 15 | //构造函数 16 | Integer(int num) { 17 | _num = num; 18 | } 19 | //计算当前Integer 和 b之间的最大公约数 20 | int gcd(Integer b) { 21 | if (!b._num) { 22 | return _num; 23 | } 24 | Integer r(_num%b._num); 25 | return b.gcd(r); 26 | } 27 | }; 28 | int main(){ 29 | int a, b; 30 | cin >> a >> b; 31 | Integer A(a); 32 | Integer B(b); 33 | cout << A.gcd(B) << endl; 34 | return 0; 35 | } 36 | -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/week3/lab3_1_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/week3/lab3_1_1.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/week3/lab3_1_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/week3/lab3_1_2.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/week3/lab3_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/week3/lab3_2.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/week3/lab3_3.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // main.cpp 3 | // lab3_3 4 | // 5 | // Created by Tangrizzly on 27/11/2017. 6 | // Copyright © 2017 Tangrizzly. All rights reserved. 7 | // 8 | 9 | #include 10 | using namespace std; 11 | 12 | class Yuebao { 13 | private: 14 | static double profitRate; 15 | double balance; 16 | public: 17 | static void setProfitRate(double rate) {profitRate = rate;} 18 | Yuebao(double b):balance(b) {} 19 | void addProfit() {balance += balance*profitRate;} 20 | void deposit(int amount) {balance += amount;} 21 | void withdraw(int amount) {balance -= amount;} 22 | double getBalance() {return balance;} 23 | }; 24 | 25 | double Yuebao::profitRate=0; 26 | 27 | int main() 28 | { 29 | int n; 30 | while(cin >> n) 31 | { 32 | double profitRate; 33 | cin >> profitRate; 34 | Yuebao::setProfitRate(profitRate);//设定余额宝的利率 35 | Yuebao y(0); //新建余额宝账户,余额初始化为0 36 | int operation;//接受输入判断是存还是取 37 | double amount;//接受输入存取金额 38 | for (int i = 0; i < n; ++i) 39 | { 40 | y.addProfit();//加入前一天余额产生的利息 41 | cin >> operation >> amount; 42 | if (operation == 0) 43 | y.deposit(amount);//存入金额 44 | else 45 | y.withdraw(amount);//取出金额 46 | } 47 | cout << y.getBalance() << endl;//输出最终账户余额 48 | } 49 | return 0; 50 | } 51 | -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/week3/lab3_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/week3/lab3_3.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/week3/lab3_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/week3/lab3_4.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/week3/实验三 .doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/week3/实验三 .doc -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/week3/第三周作业.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/week3/第三周作业.pdf -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/week4/lab4.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/week4/lab4.pdf -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/week4/lab4_1.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // lab4_1.cpp 3 | // lab4_1 4 | // 5 | // Created by Tangrizzly on 04/12/2017. 6 | // Copyright © 2017 Tangrizzly. All rights reserved. 7 | // 8 | 9 | #include 10 | #include 11 | #include 12 | using namespace std; 13 | 14 | class Complex { 15 | private: 16 | double r,i; 17 | public: 18 | void Print() { 19 | cout << r << "+" << i << "i" << endl; 20 | } 21 | Complex &operator = (char *s); //类型转换构造函数 22 | }; 23 | 24 | Complex &Complex::operator = (char *s) { 25 | r = 0; 26 | i = 0; 27 | int j = 0; 28 | for (; *(s+j)!='+'; j++) { 29 | r = r*10 + *(s+j) - '0'; 30 | } 31 | j++; 32 | for (; *(s+j)!='i'; j++) { 33 | i = i*10 + *(s+j) - '0'; 34 | } 35 | return *this; 36 | } 37 | 38 | int main() { 39 | Complex a; 40 | a = "3+4i"; a.Print(); 41 | a = "5+6i"; a.Print(); 42 | return 0; 43 | } 44 | -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/week4/lab4_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/week4/lab4_1.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/week4/lab4_2.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // lab4_2.cpp 3 | // lab4_2 4 | // 5 | // Created by Tangrizzly on 04/12/2017. 6 | // Copyright © 2017 Tangrizzly. All rights reserved. 7 | // 8 | 9 | #include 10 | #include 11 | using namespace std; 12 | 13 | class Array2 { 14 | private: 15 | int x, y; 16 | int array[20][20]; 17 | public: 18 | Array2() = default; 19 | Array2(int m, int n):x(m),y(n) {} 20 | Array2 & operator = (Array2 const &a); 21 | int * operator[] (int i) {return array[i];} 22 | int & operator() (int i, int j) {return array[i][j];} 23 | }; 24 | 25 | Array2 &Array2::operator = (Array2 const &a) { 26 | x = a.x; 27 | y = a.y; 28 | for (int i = 0; i < x; i++) { 29 | for (int j = 0; j < y; j++) { 30 | array[i][j] = a.array[i][j]; 31 | } 32 | } 33 | return *this; 34 | } 35 | 36 | int main() { 37 | Array2 a(3,4); 38 | int i,j; 39 | for( i = 0;i < 3; ++i ) 40 | for( j = 0; j < 4; j ++ ) 41 | a[i][j] = i * 4 + j; 42 | for( i = 0;i < 3; ++i ) { 43 | for( j = 0; j < 4; j ++ ) { 44 | cout << a(i,j) << ","; 45 | } 46 | cout << endl; 47 | } 48 | cout << "next" << endl; 49 | Array2 b; b = a; 50 | for( i = 0;i < 3; ++i ) { 51 | for( j = 0; j < 4; j ++ ) { 52 | cout << b[i][j] << ","; 53 | } 54 | cout << endl; 55 | } 56 | return 0; 57 | } 58 | -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/week4/lab4_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/week4/lab4_2.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/week4/lab4_3_*.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/week4/lab4_3_*.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/week4/lab4_3_: .png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/week4/lab4_3_: .png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/week4/lab4_3_big*.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/week4/lab4_3_big*.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/week4/lab4_3_big+.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/week4/lab4_3_big+.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/week4/lab4_3_big-.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/week4/lab4_3_big-.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/week4/lab4_3_big-_neg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/week4/lab4_3_big-_neg.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/week4/lab4_3_big: .png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/week4/lab4_3_big: .png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/week4/lab4_3_big:_wrong.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/week4/lab4_3_big:_wrong.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/week4/lab4_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/week4/lab4_4.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/week4/lab4_4_main.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // lab4_main.cpp 3 | // lab4_4 4 | // 5 | // Created by Tangrizzly on 07/01/2018. 6 | // Copyright © 2018 Tangrizzly. All rights reserved. 7 | // 8 | 9 | #include "lab4_4_account.hpp" 10 | 11 | int main() { 12 | Date date1(2018,1,1); 13 | SavingsAccount account("08261831", date1, 0.015); 14 | account.show(); 15 | Date date2(2018,1,5); 16 | account.deposit(5000, date2, "salary"); 17 | Date date3(2018,2,14); 18 | account.deposit(5500, date3, "lottery"); 19 | Date date4(2018,3,31); 20 | account.settle(date4); 21 | Date date5(2018,4,10); 22 | account.withdraw(2000, date5, "house rent"); 23 | Date date6(2018,5,15); 24 | account.settle(date6); 25 | return 0; 26 | } 27 | -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/week4/实验4.md: -------------------------------------------------------------------------------- 1 | # 实验4 2 | 3 | ## 实验4.1 4 | 5 | | 输出 | 6 | | :-------------------: | 7 | | ![lab4_1](lab4_1.png) | 8 | 9 | ## 实验4.2 10 | 11 | | 输出 | 12 | | :-------------------: | 13 | | ![lab4_2](lab4_2.png) | 14 | 15 | ## 实验4.3 16 | 17 | | 加法 | 18 | | :-----------------------------: | 19 | | ![lab4_3_big+](lab4_3_big+.png) | 20 | 21 | | 减法 | 22 | | :-------------------------------------: | 23 | | ![lab4_3_big-](lab4_3_big-.png) | 24 | | 被减数小于减数 | 25 | | ![lab4_3_big-_neg](lab4_3_big-_neg.png) | 26 | 27 | | 乘法 | 28 | | :-----------------------------: | 29 | | ![lab4_3_*](lab4_3_*.png) | 30 | | 大数乘法 | 31 | | ![lab4_3_big*](lab4_3_big*.png) | 32 | 33 | | 除法 | 34 | | :--------------------------------------: | 35 | | ![lab4_3_: ](lab4_3_: .png) | 36 | | 大数除法 | 37 | | ![lab4_3_big: ](lab4_3_big: .png) | 38 | | 除数为零 | 39 | | ![lab4_3_big:_wrong](lab4_3_big:_wrong.png) | 40 | 41 | ## 实验4.4 42 | 43 | | 输出 | 44 | | :-------------------: | 45 | | ![lab4_4](lab4_4.png) | 46 | 47 | -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/week4/实验四.doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/week4/实验四.doc -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/week5/lab5.md: -------------------------------------------------------------------------------- 1 | # 实验5 2 | 3 | ## 实验5.1 4 | 5 | | 输出 | 6 | | :-------------------: | 7 | | ![lab5_1](lab5_1.png) | 8 | 9 | 尽管从正方形是特殊的矩形这个角度来看,正方形可以作为矩形的派生类,但对于正方形来说,`setWidth()`和`setHeight()`是冗余的,且容易引起错误,违反了LSP原则。所以正方形不能继承矩形。解决方案:创建一个新的抽象类作为正方形和矩形的父类,将矩形和正方形的共同行为,即正方形的边长/矩形的宽移动到这个抽象类中,矩形中单独定义长。 10 | 11 | ## 实验5.2 12 | 13 | | 输出 | 14 | | :-------------------: | 15 | | ![lab5_2](lab5_2.png) | 16 | 17 | ## 实验5.3 18 | 19 | | 输出 | 20 | | :-------------------: | 21 | | ![lab5_3](lab5_3.png) | -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/week5/lab5.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/week5/lab5.pdf -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/week5/lab5_1.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // lab5_1.cpp 3 | // lab5_1 4 | // 5 | // Created by Tangrizzly on 08/01/2018. 6 | // Copyright © 2018 Tangrizzly. All rights reserved. 7 | // 8 | 9 | #include 10 | #include 11 | #include 12 | using namespace std; 13 | class CShape { 14 | public: 15 | virtual double circumference() = 0; 16 | virtual double Area() = 0; 17 | virtual void PrintfInfo() = 0; 18 | }; 19 | class CRectangle:public CShape { 20 | public: 21 | int w, h; 22 | virtual double Circumference(); 23 | virtual double Area(); 24 | virtual void PrintfInfo(); 25 | }; 26 | class CRoundRectangle:public CRectangle { 27 | public: 28 | int r; 29 | virtual double Circumference(); 30 | virtual double Area(); 31 | virtual void PrintfInfo(); 32 | }; 33 | double CRectangle::Area() { 34 | return w * h; 35 | } 36 | double CRectangle::Circumference() { 37 | return 2 * (w + h); 38 | } 39 | void CRectangle::PrintfInfo() { 40 | cout << "Rectangle Area: " << Area() << ", Circumference: " << Circumference() << endl; 41 | } 42 | double CRoundRectangle::Area() { 43 | return w * h + (w + h) * r * 2 + 3.1415926 * r * r; 44 | } 45 | double CRoundRectangle::Circumference() { 46 | return 2 * (w + h) + 2 * 3.1415926 * r; 47 | } 48 | void CRoundRectangle::PrintfInfo() { 49 | cout << "CRoundRectangle Area: " << Area() << ", Circumference: " << Circumference() << endl; 50 | } 51 | 设计测试函数test,观察函数对不同的类对象矩形(a=500,b=300)与圆角矩形(a=500,b=300,r=50) 52 | int main() { 53 | CRectangle cr; 54 | CRoundRectangle crr; 55 | CShape *test; 56 | test = &cr; 57 | test->PrintfInfo(); 58 | test = &crr; 59 | test->PrintfInfo(); 60 | return 0; 61 | } 62 | -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/week5/lab5_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/week5/lab5_1.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/week5/lab5_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/week5/lab5_2.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/week5/lab5_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/week5/lab5_3.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/week5/lab5_3/lab5_3_account.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // lab5_3_account.hpp 3 | // lab5_3 4 | // 5 | // Created by Tangrizzly on 12/01/2018. 6 | // Copyright © 2018 Tangrizzly. All rights reserved. 7 | // 8 | 9 | #ifndef lab5_3_account_hpp 10 | #define lab5_3_account_hpp 11 | 12 | #include "lab5_3_date.hpp" 13 | 14 | class Account { 15 | private: 16 | string id; 17 | double balance; 18 | static double total; 19 | Date lastDate; 20 | protected: 21 | void record(double amount, Date date, string desc); 22 | const void error(string msg) { cout << msg << endl; } 23 | public: 24 | Account(string _id, Date date):id(_id),lastDate(date) { 25 | balance = 0; 26 | } 27 | const string getId() {return id;} 28 | const double getBalance() {return balance;} 29 | const double getTotal() {return total;} 30 | const void show(); 31 | }; 32 | double Account::total = 0; 33 | void Account::record(double amount, Date date, string desc) { 34 | cout << amount << " on "; 35 | date.show(); 36 | cout << "Before: " << balance << ". "; 37 | // accumulation += balance * date.distance(lastDate); 38 | lastDate = date; 39 | balance += amount; 40 | total +=amount; 41 | cout << "Current: " << balance << ". "; 42 | cout << "Cause for " << desc << ". " << endl; 43 | } 44 | const void Account::show() { 45 | cout << "Id is " << id << ". Balance is " << balance; 46 | cout << ". Last modified date is "; 47 | lastDate.show(); 48 | } 49 | 50 | #endif /* lab5_3_account_hpp */ 51 | -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/week5/lab5_3/lab5_3_accumulator.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // lab5_3_accumulator.hpp 3 | // lab5_3 4 | // 5 | // Created by Tangrizzly on 12/01/2018. 6 | // Copyright © 2018 Tangrizzly. All rights reserved. 7 | // 8 | 9 | #ifndef lab5_3_accumulator_hpp 10 | #define lab5_3_accumulator_hpp 11 | 12 | #include "lab5_3_date.hpp" 13 | #include "cmath" 14 | 15 | class Accumulator { 16 | private: 17 | Date lastDate; 18 | double rate; 19 | double value; 20 | double accumulation; 21 | int days; 22 | public: 23 | Accumulator(Date date, double _rate, int _days):lastDate(date), rate(_rate), days(_days) { 24 | accumulation = 0; 25 | value = 0; 26 | } 27 | const double accumulate(Date date); 28 | const double getRate() {return rate;} 29 | const double getValue() {return value;} 30 | void showDate() { lastDate.show(); } 31 | void change(Date date, double value); 32 | void reset(Date date, double value); 33 | }; 34 | const double Accumulator::accumulate(Date date) { 35 | return floor((accumulation+value*date.distance(lastDate))*rate/days*100+0.5)/100; 36 | } 37 | void Accumulator::change(Date date, double _value) { 38 | accumulation += value * date.distance(lastDate); 39 | lastDate = date; 40 | value += _value; 41 | } 42 | void Accumulator::reset(Date date, double _value) { 43 | value = _value; 44 | lastDate = date; 45 | } 46 | #endif /* lab5_3_accumulator_hpp */ 47 | -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/week5/lab5_3/lab5_3_main.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // lab5_3_main.cpp 3 | // lab5_3 4 | // 5 | // Created by Tangrizzly on 12/01/2018. 6 | // Copyright © 2018 Tangrizzly. All rights reserved. 7 | // 8 | 9 | #include "lab5_3_savingaccount.hpp" 10 | #include "lab5_3_creditaccount.hpp" 11 | 12 | int main() { 13 | cout << "Testing for saving account." << endl; 14 | Date date1(2018,1,1); 15 | SavingsAccount savingaccount("08261831", date1, 0.015); 16 | savingaccount.show(); 17 | Date date2(2018,1,5); 18 | savingaccount.deposit(5000, date2, "salary"); 19 | Date date3(2018,2,14); 20 | savingaccount.deposit(5500, date3, "lottery"); 21 | Date date4(2018,3,31); 22 | savingaccount.settle(date4); 23 | Date date5(2018,4,10); 24 | savingaccount.withdraw(2000, date5, "house rent"); 25 | Date date6(2018,5,15); 26 | savingaccount.settle(date6); 27 | cout << endl << "Testing for credit account." <show(); 20 | } 21 | a[0]->read(); 22 | a[1]->read(); 23 | 24 | //首次运行时,没有之前的记录,运行以下命令 25 | //在第二次运行时,将一下命令注释掉,根据输出面板发现程序自动运行了上次一样的命令 26 | cout << endl << "Testing for saving account." << endl; 27 | Date date2(2018,1,5); 28 | a[0]->deposit(5000, date2, "salary"); 29 | Date date3(2018,2,14); 30 | a[0]->deposit(5500, date3, "lottery"); 31 | Date date4(2018,4,10); 32 | a[0]->withdraw(2000, date4, "house rent"); 33 | Date date5(2019,1,1); 34 | a[0]->settle(date5); 35 | cout << endl << "Testing for credit account." <withdraw(250, date7, "shoes"); 38 | Date date8(2018,2,1); 39 | a[1]->settle(date8); 40 | Date date9(2018,2,3); 41 | a[1]->deposit(255, date8, "repay Janurary's bill"); 42 | Date date10(2018,2,7); 43 | a[1]->withdraw(5000, date9, "jewlry"); 44 | a[1]->withdraw(360, date9, "food"); 45 | Date date11(2018,3,1); 46 | a[1]->settle(date11); 47 | Date date12(2018,3,4); 48 | a[1]->deposit(371, date12, "repay February's bill"); 49 | Date date13(2019,1,1); 50 | a[1]->settle(date13); 51 | return 0; 52 | } 53 | -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/week6/lab6_1/lab6_1_savingsaccount.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // lab6_1_savingaccount.hpp 3 | // lab6_1 4 | // 5 | // Created by Tangrizzly on 13/01/2018. 6 | // Copyright © 2018 Tangrizzly. All rights reserved. 7 | // 8 | 9 | 10 | #ifndef lab6_1_savingaccount_hpp 11 | #define lab6_1_savingaccount_hpp 12 | 13 | #include "lab6_1_date.hpp" 14 | #include "lab6_1_accumulator.hpp" 15 | #include "lab6_1_account.hpp" 16 | #include "lab6_1_Controller.hpp" 17 | 18 | class SavingsAccount: public Account{ 19 | private: 20 | Accumulator acc; 21 | Controller* con; 22 | public: 23 | SavingsAccount(string _id, Date date, double _rate):Account(_id, date), acc(date, _rate, 365) { 24 | con = new Controller(_id, this); 25 | } 26 | void read() { con->get_control(); } 27 | void deposit(double amount, Date date, string desc); 28 | void withdraw(double amount, Date date, string desc); 29 | void settle(Date date); 30 | const void show(); 31 | }; 32 | void SavingsAccount::deposit(double amount, Date date, string desc) { 33 | acc.change(date, amount); 34 | cout << "Add "; 35 | record(amount, date, desc); 36 | con->write_op("deposit", date, amount, desc); 37 | } 38 | void SavingsAccount::withdraw(double amount, Date date, string desc) { 39 | acc.change(date, -amount); 40 | cout << "Withdraw "; 41 | record(-amount, date, desc); 42 | con->write_op("withdraw", date, amount, desc); 43 | } 44 | void SavingsAccount::settle(Date date) { 45 | if (!date.getMonth()) { 46 | return; 47 | } 48 | cout << "Settle "; 49 | float t = acc.accumulate(date); 50 | record(t, date, "settling"); 51 | acc.reset(date, 0); 52 | con->write_op("settle", date, 0, ""); 53 | } 54 | const void SavingsAccount::show() { 55 | cout << "Id is " << id << ". Balance is " << balance; 56 | cout << ". Last modified date is "; 57 | lastDate.show(); 58 | } 59 | #endif /* lab6_1_account_hpp */ 60 | -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/week6/lab6_1_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/week6/lab6_1_1.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/week6/lab6_1_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/week6/lab6_1_2.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/week6/lab6_1_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/week6/lab6_1_3.png -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/week6/lab6_2/arm.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // arm.hpp 3 | // lab6_2_2 4 | // 5 | // Created by Tangrizzly on 14/01/2018. 6 | // Copyright © 2018 Tangrizzly. All rights reserved. 7 | // 8 | 9 | #ifndef arm_hpp 10 | #define arm_hpp 11 | 12 | #include 13 | using namespace std; 14 | 15 | class Warrior; 16 | enum armType {sword = 0,bomb,arrow}; 17 | 18 | class Arm { 19 | protected: 20 | armType type; 21 | int attack_point; 22 | public: 23 | Arm(armType _type):type(_type) { 24 | attack_point = 0; 25 | } 26 | void setAttackPoint(int p) { 27 | attack_point = p; 28 | } 29 | virtual int attack(Warrior* itself, Warrior* enemy) {return 0;} 30 | virtual bool exist() {return 1;} 31 | virtual string getType() = 0; 32 | int getTypeNumber() {return type;} 33 | const int getAttackPoint() {return attack_point;} 34 | virtual int print() {return 0;}; 35 | }; 36 | 37 | #endif /* arm_hpp */ 38 | -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/week6/lab6_2/city.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // city.hpp 3 | // lab6_2_2 4 | // 5 | // Created by Tangrizzly on 19/01/2018. 6 | // Copyright © 2018 Tangrizzly. All rights reserved. 7 | // 8 | 9 | #ifndef city_hpp 10 | #define city_hpp 11 | 12 | #include "cwarrior.hpp" 13 | 14 | enum Flag {blue, red, none}; 15 | 16 | class City { 17 | private: 18 | int* life; 19 | Flag flag; 20 | int red_combo; 21 | int blue_combo; 22 | public: 23 | Warrior* warrior; 24 | Warrior* enemyWarrior; 25 | City(Warrior* w, Warrior* enemy_w, int* _life):warrior(w), enemyWarrior(enemy_w), life(_life) { 26 | flag = none; 27 | red_combo = 0; 28 | blue_combo = 0; 29 | } 30 | int warriorNumber() { 31 | if (warrior!=NULL && enemyWarrior!=NULL) { 32 | return 2; 33 | } else if (warrior==NULL && enemyWarrior==NULL) { 34 | return 0; 35 | } else { 36 | return 1; 37 | } 38 | } 39 | int getlife() {return *life;} 40 | void setlife() {*life += 5;} 41 | void resetLife() {*life = 0;} 42 | Flag getFlag() {return flag;} 43 | void failed(Flag type) { 44 | if (type == red) { 45 | red_combo = 0; 46 | } else { 47 | blue_combo = 0; 48 | } 49 | } 50 | void success(Flag type, string stype, Clock* htime, int city) { 51 | if (type == red) { 52 | red_combo++; 53 | if (red_combo >= 2) { 54 | flag = red; 55 | cout << *htime << ' ' << stype << " flag raised in city " << city << endl; 56 | } 57 | } else { 58 | blue_combo++; 59 | if ((blue_combo >= 2)) { 60 | flag = blue; 61 | } 62 | } 63 | } 64 | }; 65 | 66 | #endif /* city_hpp */ 67 | -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/week6/lab6_2/clock.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // clock.hpp 3 | // lab6_2_2 4 | // 5 | // Created by Tangrizzly on 14/01/2018. 6 | // Copyright © 2018 Tangrizzly. All rights reserved. 7 | // 8 | 9 | #ifndef clock_h 10 | #define clock_h 11 | 12 | class Clock { 13 | private: 14 | int hours; 15 | int minutes; 16 | public: 17 | Clock() { 18 | hours = 0; 19 | minutes = 0; 20 | } 21 | void click_clock(int min); 22 | const int getHours() {return hours;} 23 | const int getMinutes() {return minutes;} 24 | const int getTotalTime() {return hours*60 + minutes;} 25 | friend ostream& operator<< (ostream& out, Clock &clock); 26 | }; 27 | 28 | void Clock::click_clock(int min) { 29 | int total_min = minutes + min; 30 | minutes = total_min % 60; 31 | hours += total_min / 60; 32 | } 33 | 34 | ostream& operator<< (ostream &out, Clock &clock) { 35 | if (clock.hours/100) { 36 | out << clock.hours/100; 37 | } else { 38 | out << 0; 39 | } 40 | if (clock.hours/10%10) { 41 | out << clock.hours/10%10; 42 | } else { 43 | out << 0; 44 | } 45 | out << clock.hours%10; 46 | out << ':'; 47 | if (clock.minutes/10) { 48 | out << clock.minutes/10; 49 | } else { 50 | out << 0; 51 | } 52 | out << clock.minutes%10; 53 | return out; 54 | } 55 | 56 | #endif /* clock_h */ 57 | -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/week6/lab6_2/headquarter.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // headquarter.hpp 3 | // lab6_2_2 4 | // 5 | // Created by Tangrizzly on 14/01/2018. 6 | // Copyright © 2018 Tangrizzly. All rights reserved. 7 | // 8 | 9 | #ifndef headquarter_hpp 10 | #define headquarter_hpp 11 | 12 | #include "city.hpp" 13 | 14 | class Headquarter { 15 | //用一个N维的数组记录每个城市中的英雄,当值为空时表示没有英雄 16 | protected: 17 | int warriorBornOrder[5]; 18 | int elements; 19 | int number; 20 | Clock* htime; 21 | City** cities; 22 | int arrived; 23 | void warriorBorn(Warrior **c, Warrior **enemy); 24 | virtual void born(Headquarter* enemyHeadquater) = 0; 25 | virtual Warrior* march(Headquarter* enemyHeadquater) = 0; 26 | virtual void shotArrow(Headquarter* enemyHeadquater) = 0; 27 | public: 28 | Headquarter(int _life, Clock* _htime, City** _cities):elements(_life), htime(_htime), cities(_cities){ 29 | arrived = 0; 30 | number = 1; 31 | } 32 | int scheduled(Headquarter* enemyHeadquater); 33 | virtual string getType() = 0; 34 | virtual Flag getFlagType() = 0; 35 | City** getcities() {return cities;} 36 | void getCityLife(City* city) { 37 | if (city->getlife() > 0) { 38 | elements += city->getlife(); 39 | city->resetLife(); 40 | } 41 | } 42 | void reportLife(); 43 | void award(Warrior* warrior) { 44 | if (elements > 8) { 45 | warrior->gethealed(8); 46 | elements -= 8; 47 | } 48 | } 49 | bool arrive() { 50 | arrived++; 51 | if (arrived >= 2) { 52 | return 1; 53 | } else { 54 | return 0; 55 | } 56 | } 57 | }; 58 | #endif /* headquarter_hpp */ 59 | -------------------------------------------------------------------------------- /Object_Oriented_Programming_Assignment/week6/实验六.doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Object_Oriented_Programming_Assignment/week6/实验六.doc -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Course-Assignment 2 | 3 | ### 算法实验及作业 4 | 5 | 包含代码及分析: 6 | 7 | - DataStructure 8 | - AlgorithmsAnalysis 9 | - ObjectOrientedProgrammingAssignment 10 | - 计算机组成原理 11 | - 数字逻辑 12 | 13 | ### 实验报告 14 | 15 | - 计算机网络 16 | - 操作系统 17 | - DatabaseSystem 18 | - Verilog 硬件编程 19 | - 微机接口 20 | -------------------------------------------------------------------------------- /Verilog实验报告/Verilog实验报告.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/Verilog实验报告/Verilog实验报告.docx -------------------------------------------------------------------------------- /微机接口大作业/微机接口大作业.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/微机接口大作业/微机接口大作业.pdf -------------------------------------------------------------------------------- /微机接口实验/创新设计/捕获.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/微机接口实验/创新设计/捕获.PNG -------------------------------------------------------------------------------- /微机接口实验/创新设计/流程图.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/微机接口实验/创新设计/流程图.png -------------------------------------------------------------------------------- /微机接口实验/创新设计/综合设计实验.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/微机接口实验/创新设计/综合设计实验.docx -------------------------------------------------------------------------------- /微机接口实验/预习报告.pages: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/微机接口实验/预习报告.pages -------------------------------------------------------------------------------- /微机接口实验/验证实验.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/微机接口实验/验证实验.docx -------------------------------------------------------------------------------- /微机接口实验/验证实验proteus8255.pdsprj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/微机接口实验/验证实验proteus8255.pdsprj -------------------------------------------------------------------------------- /操作系统实验/实验报告.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/操作系统实验/实验报告.docx -------------------------------------------------------------------------------- /数字逻辑实验/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/数字逻辑实验/.DS_Store -------------------------------------------------------------------------------- /数字逻辑实验/实验1_flowing_light/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/数字逻辑实验/实验1_flowing_light/.DS_Store -------------------------------------------------------------------------------- /数字逻辑实验/实验1_flowing_light/flowing_light.v: -------------------------------------------------------------------------------- 1 | `timescale 1ns / 1ps 2 | 3 | module flowing_light( input clk, 4 | input rst, 5 | output [15:0] led); 6 | reg [23 : 0] cnt_reg; reg [15 : 0] light_reg; 7 | always @ (posedge clk) begin 8 | if (rst) 9 | cnt_reg <= 0; 10 | else 11 | cnt_reg <= cnt_reg + 1; 12 | end 13 | always @ (posedge clk) begin 14 | if (rst) 15 | light_reg <= 16'h0001; 16 | else if (cnt_reg == 24'hffffff) begin 17 | if (light_reg == 16'h8000) light_reg <= 16'h0001; 18 | else light_reg <= light_reg << 1; 19 | end end 20 | assign led = light_reg; endmodule 21 | -------------------------------------------------------------------------------- /数字逻辑实验/实验1_flowing_light/test.v: -------------------------------------------------------------------------------- 1 | 2 | `timescale 1ns / 1ps 3 | module test( ); 4 | reg clk; 5 | reg rst; 6 | wire [3 : 0] led; 7 | flowing_light u0( .clk(clk), 8 | .rst(rst), .led(led) ); 9 | parameter PERIOD = 10; 10 | always begin clk = 1'b0; 11 | #(PERIOD/2) clk = 1'b1; #(PERIOD/2); 12 | end 13 | initial begin clk = 1'b0; rst = 1'b0; #100; 14 | rst = 1'b1; 15 | #100; rst = 1'b0; 16 | end endmodule 17 | -------------------------------------------------------------------------------- /数字逻辑实验/实验1_flowing_light/数字逻辑实验一.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/数字逻辑实验/实验1_flowing_light/数字逻辑实验一.docx -------------------------------------------------------------------------------- /数字逻辑实验/实验2/adder1/adder1.v: -------------------------------------------------------------------------------- 1 | `timescale 1ns / 1ps 2 | module RippleCarry( 3 | input [7:0]a,b, 4 | input cin, 5 | output cout, 6 | output [7:0]s 7 | ); 8 | wire [7:1]c; 9 | adder a0(a[0],b[0],cin,c[1],s[0]); 10 | adder a1(a[1],b[1],c[1],c[2],s[1]); 11 | adder a2(a[2],b[2],c[2],c[3],s[2]); 12 | adder a3(a[3],b[3],c[3],c[4],s[3]); 13 | adder a4(a[4],b[4],c[4],c[5],s[4]); 14 | adder a5(a[5],b[5],c[5],c[6],s[5]); 15 | adder a6(a[6],b[6],c[6],c[7],s[6]); 16 | adder a7(a[7],b[7],c[7],cout,s[7]); 17 | endmodule 18 | 19 | module adder( 20 | input a,b,cin, 21 | output cout,s 22 | ); 23 | assign s=cin^a^b; 24 | assign cout=a&b|b&cin|a&cin; 25 | endmodule 26 | -------------------------------------------------------------------------------- /数字逻辑实验/实验2/adder1/tb.v: -------------------------------------------------------------------------------- 1 | `timescale 1ns / 1ps 2 | module Carry_tb; 3 | reg [7:0]a,b; 4 | reg cin; 5 | wire cout; 6 | wire [7:0]s; 7 | 8 | initial begin 9 | cin=0; 10 | a=0;b=0; 11 | repeat(10) 12 | begin 13 | a=($random)%256; 14 | b=($random)%256; 15 | $display("%t",$time); 16 | end 17 | #10 $stop; 18 | end 19 | RippleCarry u0(a,b,cin,cout,s); 20 | endmodule 21 | -------------------------------------------------------------------------------- /数字逻辑实验/实验2/adder2/adder2.v: -------------------------------------------------------------------------------- 1 | `timescale 1ns / 1ps 2 | `timescale 1ns / 1ps 3 | module carrylookahead4( 4 | input [3:0]a,b, 5 | input cin, 6 | output cout, 7 | output [3:0]s 8 | ); 9 | wire [3:0]G,P,C; 10 | assign G = a&b; 11 | assign P = a^b; 12 | assign C[0]=cin; 13 | assign C[1] = G[0]|P[0]&C[0]; 14 | assign C[2] = G[1]|P[1]&G[0]|P[1]&P[0]&C[0]; 15 | assign C[3] = G[2]|P[2]&G[1]|P[2]&P[1]&G[0]|P[2]&P[1]&P[0]&C[0]; 16 | assign cout = G[3]|P[3]&G[2]|P[3]&P[2]&G[1]|P[3]&P[2]&P[1]&G[0]|P[3]&P[2]&P[1]&P[0]&C[0]; 17 | assign s = P^C; 18 | endmodule 19 | 20 | module carrylookahead8( 21 | input [7:0]a,b, 22 | input cin, 23 | output cout, 24 | output [7:0]s 25 | ); 26 | wire c; 27 | carrylookahead4 c1(a[3:0],b[3:0],cin,c,s[3:0]); 28 | carrylookahead4 c2(a[7:4],b[7:4],c,cout,s[7:4]); 29 | endmodule 30 | -------------------------------------------------------------------------------- /数字逻辑实验/实验2/adder2/tb.v: -------------------------------------------------------------------------------- 1 | `timescale 1ns / 1ps 2 | 3 | module Carry_tb; 4 | reg [7:0]a,b; 5 | reg cin; 6 | wire cout; 7 | wire [7:0]s; 8 | 9 | initial begin 10 | cin=0; 11 | a=0;b=0; 12 | repeat(10) 13 | begin 14 | #10 a=($random)%256; 15 | b=($random)%256; 16 | end 17 | #10 $stop; 18 | end 19 | carrylookahead8 u0(a,b,cin,cout,s); 20 | endmodule 21 | 22 | -------------------------------------------------------------------------------- /数字逻辑实验/实验2/adder3/adder3.v: -------------------------------------------------------------------------------- 1 | `timescale 1ns / 1ps 2 | module carryselect( 3 | input [7:0]a,b, 4 | input cin, 5 | output cout, 6 | output [7:0]s 7 | ); 8 | wire [7:0]c1; 9 | wire [7:0]c0; 10 | wire [7:1]c; 11 | wire [7:0]s1,s0; 12 | adder1 a01(a[0],b[0],c1[0],s1[0]); 13 | adder0 a00(a[0],b[0],c0[0],s0[0]); 14 | adder1 a11(a[1],b[1],c1[1],s1[1]); 15 | adder0 a10(a[1],b[1],c0[1],s0[1]); 16 | adder1 a21(a[2],b[2],c1[2],s1[2]); 17 | adder0 a20(a[2],b[2],c0[2],s0[2]); 18 | adder1 a31(a[3],b[3],c1[3],s1[3]); 19 | adder0 a30(a[3],b[3],c0[3],s0[3]); 20 | adder1 a41(a[4],b[4],c1[4],s1[4]); 21 | adder0 a40(a[4],b[4],c0[4],s0[4]); 22 | adder1 a51(a[5],b[5],c1[5],s1[5]); 23 | adder0 a50(a[5],b[5],c0[5],s0[5]); 24 | adder1 a61(a[6],b[6],c1[6],s1[6]); 25 | adder0 a60(a[6],b[6],c0[6],s0[6]); 26 | adder1 a71(a[7],b[7],c1[7],s1[7]); 27 | adder0 a70(a[7],b[7],c0[7],s0[7]); 28 | mult m0(c1[0],c0[0],s1[0],s0[0],cin,c[1],s[0]); 29 | mult m1(c1[1],c0[1],s1[1],s0[1],c[1],c[2],s[1]); 30 | mult m2(c1[2],c0[2],s1[2],s0[2],c[2],c[3],s[2]); 31 | mult m3(c1[3],c0[3],s1[3],s0[3],c[3],c[4],s[3]); 32 | mult m4(c1[4],c0[4],s1[4],s0[4],c[4],c[5],s[4]); 33 | mult m5(c1[5],c0[5],s1[5],s0[5],c[5],c[6],s[5]); 34 | mult m6(c1[6],c0[6],s1[6],s0[6],c[6],c[7],s[6]); 35 | mult m7(c1[7],c0[7],s1[7],s0[7],c[7],cout,s[7]); 36 | endmodule 37 | 38 | module mult( 39 | input c1,c0,s1,s0,c, 40 | output d,s 41 | ); 42 | assign d = c?c1:c0; 43 | assign s = c?s1:s0; 44 | endmodule 45 | 46 | module adder1( 47 | input a,b, 48 | output cout,s 49 | ); 50 | assign s=1^a^b; 51 | assign cout=a&b|b|a; 52 | endmodule 53 | 54 | module adder0( 55 | input a,b, 56 | output cout,s 57 | ); 58 | assign s=0^a^b; 59 | assign cout=a&b; 60 | endmodule 61 | -------------------------------------------------------------------------------- /数字逻辑实验/实验2/adder3/tb.v: -------------------------------------------------------------------------------- 1 | `timescale 1ns / 1ps 2 | 3 | module Carry_tb; 4 | reg [7:0]a,b; 5 | reg cin; 6 | wire cout; 7 | wire [7:0]s; 8 | 9 | initial begin 10 | cin=0; 11 | a=0;b=0; 12 | repeat(10) 13 | begin 14 | #10 a=($random)%256; 15 | b=($random)%256; 16 | end 17 | #10 $stop; 18 | end 19 | carryselect u0(a,b,cin,cout,s); 20 | endmodule 21 | -------------------------------------------------------------------------------- /数字逻辑实验/实验2/div8/div8.v: -------------------------------------------------------------------------------- 1 | `timescale 1ns / 1ps 2 | module div8( 3 | input [15:0] numerator, 4 | input [7:0] denominator, 5 | output [15:0] quotient, 6 | output [7:0] remainder 7 | ); 8 | wire [15:0] numerator; 9 | wire [7:0] denominator; 10 | reg [15:0] quotient; 11 | reg [7:0] remainder; 12 | reg [7:0] remH; 13 | reg [7:0] remL; 14 | reg[7:0] quotH; 15 | reg[7:0] quotL; 16 | always@(*) 17 | begin 18 | div8({1'b0,numerator[15:8]},denominator,quotH,remH); 19 | div8({remH,numerator[7:0]},denominator,quotL,remL); 20 | quotient[15:8]=quotH; 21 | quotient[7:0]=quotL; 22 | remainder=remL; 23 | end 24 | task div8( 25 | input[15:0] numer, 26 | input[7:0] denom, 27 | output [7:0] quot, 28 | output [7:0] rem 29 | ); 30 | begin :D8 31 | reg [8:0] d; 32 | reg [8:0] n1; 33 | reg [7:0] n2; 34 | d={1'b0,denom}; 35 | n2=numer[7:0]; 36 | n1={1'b0,numer[15:8]}; 37 | repeat(8) 38 | begin 39 | n1={n1[7:0],n2[7]}; 40 | n2={n2[6:0],1'b0}; 41 | if(n1>=d) 42 | begin 43 | n1=n1-d; 44 | n2[0]=1; 45 | end 46 | end 47 | quot=n2; 48 | rem=n1[7:0]; 49 | end 50 | endtask 51 | endmodule 52 | 53 | -------------------------------------------------------------------------------- /数字逻辑实验/实验2/div8/div8_sim.v: -------------------------------------------------------------------------------- 1 | `timescale 1ns / 1ps 2 | module div84_sim(); 3 | reg[15:0] numerator; 4 | reg[7:0] denominator; 5 | wire [15:0]quotient; 6 | wire [7:0] remainder; 7 | div8 U2(numerator,denominator,quotient,remainder); 8 | initial 9 | begin 10 | numerator=0; 11 | denominator=1; 12 | repeat(10) 13 | begin 14 | #10 numerator={$random}%128+63; 15 | denominator={$random}%63; 16 | end 17 | #10 $stop; 18 | end 19 | endmodule -------------------------------------------------------------------------------- /数字逻辑实验/实验2/div8/test.v: -------------------------------------------------------------------------------- 1 | `timescale 1ns / 1ps 2 | 3 | -------------------------------------------------------------------------------- /数字逻辑实验/实验2/div_4/div4.v: -------------------------------------------------------------------------------- 1 | `timescale 1ns / 1ps 2 | 3 | module div4( 4 | input [7:0] numerator, 5 | input [3:0] denominator, 6 | output [7:0] quotient, 7 | output [3:0] remainder 8 | ); 9 | wire [7:0] numerator; 10 | wire [3:0] denominator; 11 | reg [7:0] quotient; 12 | reg [3:0] remainder; 13 | reg [3:0] remH; 14 | reg [3:0] remL; 15 | reg [3:0] quotH; 16 | reg [3:0] quotL; 17 | always@(*) 18 | begin 19 | div4({1'b0,numerator[7:4]},denominator,quotH,remH); 20 | div4({remH,numerator[3:0]},denominator,quotL,remL); 21 | quotient[7:4]=quotH; 22 | quotient[3:0]=quotL; 23 | remainder=remL; 24 | end 25 | task div4( 26 | input[7:0] numer, 27 | input[3:0] denom, 28 | output[3:0] quot, 29 | output[3:0] rem); 30 | begin :D4 31 | reg[4:0]d; 32 | reg[4:0]n1; 33 | reg[3:0]n2; 34 | d={1'b0,denom}; 35 | n2=numer[3:0]; 36 | n1={1'b0,numer[7:4]}; 37 | repeat(4) 38 | begin 39 | n1={n1[3:0],n2[3]}; 40 | n2={n2[2:0],1'b0}; 41 | if(n1>=d) 42 | begin 43 | n1=n1-d; 44 | n2[0]=1; 45 | end 46 | end 47 | quot=n2; 48 | rem=n1[3:0]; 49 | end 50 | endtask 51 | endmodule 52 | 53 | -------------------------------------------------------------------------------- /数字逻辑实验/实验2/div_4/test.v: -------------------------------------------------------------------------------- 1 | `timescale 1ns / 1ps 2 | 3 | module test; 4 | reg [7:0] numerator; 5 | reg [3:0] denominator; 6 | wire [7:0] quotient; 7 | wire [3:0] remainder; 8 | 9 | initial begin 10 | numerator=0; 11 | denominator=1; 12 | repeat(10) begin 13 | #10 numerator=($random)%16+7; 14 | denominator=($random)%16+1; 15 | end 16 | #10 $stop; 17 | end 18 | 19 | div4 U1(.numerator(numerator),.denominator (denominator),.quotient (quotient),.remainder(remainder)); 20 | endmodule 21 | -------------------------------------------------------------------------------- /数字逻辑实验/实验2/mul4/mul.v: -------------------------------------------------------------------------------- 1 | `timescale 1ns / 1ps 2 | 3 | module mul( 4 | input [3:0]a, 5 | input [3:0]b, 6 | output reg [7:0]p 7 | ); 8 | 9 | reg [7:0]pv; 10 | reg [7:0]ap; 11 | integer i; 12 | 13 | always@(*) begin 14 | pv = 8'b00000000; 15 | ap = {4'b0000,a}; 16 | for (i=0;i<=3;i=i+1) begin 17 | if (b[i] == 1) 18 | pv = ap+pv; 19 | ap = ap<<1; 20 | end 21 | p = pv; 22 | end 23 | endmodule 24 | -------------------------------------------------------------------------------- /数字逻辑实验/实验2/mul4/test.v: -------------------------------------------------------------------------------- 1 | `timescale 1ns / 1ps 2 | 3 | module test; 4 | reg [3:0]a; 5 | reg [3:0]b; 6 | wire [7:0]p; 7 | 8 | initial begin 9 | a = 0; 10 | b = 0; 11 | repeat(10) begin 12 | #10 a = {$random}%16; 13 | b = {$random}%16; 14 | end 15 | #10 $stop; 16 | end 17 | 18 | mul u0(a,b,p); 19 | endmodule 20 | -------------------------------------------------------------------------------- /数字逻辑实验/实验2/mult8/mult.v: -------------------------------------------------------------------------------- 1 | `timescale 1ns / 1ps 2 | 3 | module mult( 4 | input [7:0]a, 5 | input [7:0]b, 6 | output reg [15:0]p 7 | ); 8 | 9 | reg [15:0]pv; 10 | reg [15:0]ap; 11 | integer i; 12 | 13 | always@(*) begin 14 | pv = 16'h0000; 15 | ap = {8'h00,a}; 16 | for (i=0;i<8;i=i+1) begin 17 | if (b[i] == 1) begin 18 | pv = ap+pv; 19 | end 20 | ap = ap<<1; 21 | end 22 | p = pv; 23 | end 24 | endmodule -------------------------------------------------------------------------------- /数字逻辑实验/实验2/mult8/test.v: -------------------------------------------------------------------------------- 1 | `timescale 1ns / 1ps 2 | 3 | module test; 4 | reg [7:0]a; 5 | reg [7:0]b; 6 | wire [15:0]p; 7 | 8 | initial begin 9 | a = 0; 10 | b = 0; 11 | repeat(10) begin 12 | #10 a = {$random}%256; 13 | b = {$random}%256; 14 | end 15 | #10 $stop; 16 | end 17 | 18 | mult u0(a,b,p); 19 | endmodule -------------------------------------------------------------------------------- /数字逻辑实验/实验2/数字逻辑实验二.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/数字逻辑实验/实验2/数字逻辑实验二.docx -------------------------------------------------------------------------------- /数字逻辑实验/实验3/lab3_1/GPU.v: -------------------------------------------------------------------------------- 1 | `timescale 1ns / 1ps 2 | 3 | module GPU( 4 | input clk3hz, 5 | input clr, 6 | output [15:0]dataBus 7 | ); 8 | 9 | reg [31:0]msgArray; 10 | parameter NUMBER = 32'h40123456; 11 | assign dataBus = msgArray[31:16]; 12 | always @ (posedge clk3hz or posedge clr) 13 | if (!clr) 14 | msgArray <= NUMBER; 15 | else begin 16 | msgArray[3:0] <= msgArray[31:28]; 17 | msgArray[31:4] <= msgArray[27:0]; 18 | end 19 | endmodule 20 | -------------------------------------------------------------------------------- /数字逻辑实验/实验3/lab3_1/clkDiv.v: -------------------------------------------------------------------------------- 1 | `timescale 1ns / 1ps 2 | 3 | module clkDiv( 4 | input clk100mhz, 5 | output clk190hz, 6 | output clk3hz 7 | ); 8 | 9 | reg [25:0]count = 0; 10 | assign clk190hz = count[18]; 11 | assign clk3hz = count[25]; 12 | always @(posedge clk100mhz) count<=count+1; 13 | 14 | endmodule 15 | -------------------------------------------------------------------------------- /数字逻辑实验/实验3/lab3_1/segMsg.v: -------------------------------------------------------------------------------- 1 | `timescale 1ns / 1ps 2 | 3 | module segMsg( 4 | input clk190hz, 5 | input [15:0]dataBus, 6 | output reg[3:0]pos, 7 | output reg[7:0]seg 8 | ); 9 | 10 | reg [1:0]posC; 11 | reg [3:0]dataP; 12 | 13 | always @(posedge clk190hz) begin 14 | case (posC) 15 | 0:begin 16 | pos <= 4'b0001; 17 | dataP <= dataBus[3:0]; 18 | end 19 | 1:begin 20 | pos <= 4'b0010; 21 | dataP <= dataBus[7:4]; 22 | end 23 | 2:begin 24 | pos <=4'b0100; 25 | dataP <=dataBus[11:8]; 26 | end 27 | 3:begin 28 | pos <=4'b1000; 29 | dataP <=dataBus[15:12]; 30 | end 31 | endcase 32 | posC = posC +1; 33 | end 34 | 35 | always @ (dataP) 36 | case(dataP) 37 | 0: seg = 8'b0011_1111; 38 | 1: seg = 8'b0000_0110; 39 | 2: seg = 8'b0101_1011; 40 | 3: seg = 8'b0100_1111; 41 | 4: seg = 8'b0110_0110; 42 | 5: seg = 8'b0110_1101; 43 | 6: seg = 8'b0111_1101; 44 | 7: seg = 8'b0000_0111; 45 | 8: seg = 8'b0111_1111; 46 | 9: seg = 8'b0110_1111; 47 | 10: seg = 8'b0100_0000; 48 | 11: seg = 8'b0000_0000; 49 | default : seg = 8'b0000_1000; 50 | endcase 51 | endmodule 52 | -------------------------------------------------------------------------------- /数字逻辑实验/实验3/lab3_1/show number.v: -------------------------------------------------------------------------------- 1 | `timescale 1ns / 1ps 2 | 3 | module show number(); 4 | endmodule 5 | -------------------------------------------------------------------------------- /数字逻辑实验/实验3/lab3_1/top.v: -------------------------------------------------------------------------------- 1 | `timescale 1ns / 1ps 2 | 3 | module top( 4 | input clk100mhz, 5 | input clr, 6 | output [3:0]pos, 7 | output [7:0]seg 8 | ); 9 | 10 | wire clk190hz,clk3hz; 11 | wire [15:0]dataBus; 12 | 13 | clkDiv U1(clk100mhz,clk190hz,clk3hz); 14 | GPU U2(clk3hz,clr,dataBus); 15 | segMsg U3(clk190hz,dataBus,pos,seg); 16 | 17 | endmodule -------------------------------------------------------------------------------- /数字逻辑实验/实验3/lab3_2/clkDiv.v: -------------------------------------------------------------------------------- 1 | `timescale 1ns / 1ps 2 | 3 | module clkDiv( 4 | input clk100mhz, 5 | output clk190hz, 6 | output clk12hz, 7 | output clk3hz 8 | ); 9 | 10 | reg [25:0]count = 0; 11 | reg [17:0]count1 = 0; 12 | reg [23:0]count2 = 0; 13 | 14 | assign clk190hz = count1[17]; 15 | assign clk3hz = count[25]; 16 | assign clk12hz = count2[23]; 17 | always @(posedge clk100mhz) count<=count+1; 18 | always @(posedge clk100mhz) count1<=count1+1; 19 | always @(posedge clk100mhz) count2<=count2+1; 20 | 21 | endmodule 22 | 23 | -------------------------------------------------------------------------------- /数字逻辑实验/实验3/lab3_2/shake_elimination.v: -------------------------------------------------------------------------------- 1 | `timescale 1ns / 1ps 2 | 3 | module btnDeal( 4 | input clk_190Hz, 5 | input btnIn, 6 | output btnOut 7 | ); 8 | reg delay1; 9 | reg delay2; 10 | reg delay3; 11 | 12 | always @(posedge clk_190Hz)begin 13 | delay3 = delay2; 14 | delay2 = delay1; 15 | delay1 = btnIn; 16 | end 17 | assign btnOut = delay1 & delay2 & delay3; 18 | 19 | endmodule 20 | 21 | -------------------------------------------------------------------------------- /数字逻辑实验/实验3/lab3_2/top.v: -------------------------------------------------------------------------------- 1 | `timescale 1ns / 1ps 2 | 3 | module top( 4 | input clk100mhz, 5 | input main_switch, 6 | input start_stop_switch, 7 | input high_low_switch, 8 | input [3:0]control, 9 | output [3:0]pos, 10 | output [3:0]sop, 11 | output [7:0]seg1, 12 | output [7:0]seg2 13 | ); 14 | 15 | wire clk190hz,clk12hz,clk3hz,en; 16 | wire [15:0]dataBus1,dataBus2,dataBusInfo; 17 | wire [3:0]GPUcontrol; 18 | 19 | clkDiv U1(clk100mhz,clk190hz,clk12hz,clk3hz); 20 | GPU U2(clk3hz,clk12hz,main_switch,start_stop_switch,high_low_switch,GPUcontrol,en,dataBus1,dataBus2,dataBusInfo); 21 | segMsg U3(clk190hz,dataBus1,dataBus2,dataBusInfo,en,pos,sop,seg1,seg2); 22 | btnDeal U4(clk190hz,control[0],GPUcontrol[0]); 23 | btnDeal U5(clk190hz,control[1],GPUcontrol[1]); 24 | btnDeal U6(clk190hz,control[2],GPUcontrol[2]); 25 | btnDeal U7(clk190hz,control[3],GPUcontrol[3]); 26 | 27 | endmodule -------------------------------------------------------------------------------- /数字逻辑实验/实验3/lab3_3/SRAMRead.v: -------------------------------------------------------------------------------- 1 | `timescale 1ns / 1ps 2 | 3 | module SRAMRead( 4 | input clk100mhz, 5 | input enable, 6 | input chooseAddr, 7 | inout [15:0]dataBus, 8 | output reg[18:0]addrBus, 9 | output chipEnable,outEnable,upEnable,lowEnable, 10 | output reg write_read, 11 | output reg[15:0]LED 12 | ); 13 | 14 | assign outEnable = 0; 15 | assign upEnable = 0; 16 | assign lowEnable = 0; 17 | 18 | 19 | end 20 | 21 | endmodule 22 | -------------------------------------------------------------------------------- /数字逻辑实验/实验3/lab3_3/SRAMWrite.v: -------------------------------------------------------------------------------- 1 | `timescale 1ns / 1ps 2 | 3 | module SRAM( 4 | input clk100mhz, 5 | input enable, 6 | input chooseAddr, 7 | input [15:0]data, 8 | inout [15:0]dataBus, 9 | output reg[18:0]addrBus, 10 | output chipEnable,upEnable,lowEnable, 11 | output write_read,outEnable, 12 | output [15:0]LED 13 | ); 14 | 15 | reg [15:0]LED; 16 | reg write_read; 17 | reg outEnable; 18 | reg [15:0]tempdata; 19 | 20 | assign dataBus = tempdata; 21 | assign chipEnable = 0; 22 | assign upEnable = 0; 23 | assign lowEnable = 0; 24 | 25 | always @ (posedge clk100mhz) begin 26 | case (chooseAddr) 27 | 0: addrBus <= 19'b000_0000_0000_0000_0000; 28 | 1: addrBus <= 19'b000_0000_0000_0000_0001; 29 | endcase 30 | end 31 | 32 | always @ (posedge clk100mhz) begin 33 | if (enable) begin 34 | write_read <= 1'b0; 35 | outEnable <= 1'b1; 36 | tempdata <= data; 37 | end 38 | else begin 39 | write_read = 1; 40 | outEnable = 0; 41 | end 42 | end 43 | 44 | always @ (posedge clk100mhz) begin 45 | write_read <= 1; 46 | LED <= dataBus; 47 | end 48 | 49 | endmodule 50 | -------------------------------------------------------------------------------- /数字逻辑实验/实验3/lab3_3/clkDiv.v: -------------------------------------------------------------------------------- 1 | `timescale 1ns / 1ps 2 | 3 | module clkDiv( 4 | input clk100mhz, 5 | output clk190hz, 6 | output clk12hz, 7 | output clk3hz 8 | ); 9 | 10 | reg [25:0]count = 0; 11 | reg [17:0]count1 = 0; 12 | reg [23:0]count2 = 0; 13 | 14 | assign clk190hz = count1[17]; 15 | assign clk3hz = count[25]; 16 | assign clk12hz = count2[23]; 17 | 18 | always @(posedge clk100mhz) count<=count+1; 19 | always @(posedge clk100mhz) count1<=count1+1; 20 | always @(posedge clk100mhz) count2<=count2+1; 21 | 22 | endmodule 23 | 24 | 25 | -------------------------------------------------------------------------------- /数字逻辑实验/实验3/lab3_3/shake_elimination.v: -------------------------------------------------------------------------------- 1 | `timescale 1ns / 1ps 2 | 3 | module btnDeal( 4 | input clk_190Hz, 5 | input btnIn, 6 | output btnOut 7 | ); 8 | reg delay1; 9 | reg delay2; 10 | reg delay3; 11 | 12 | always @(posedge clk_190Hz)begin 13 | delay3 = delay2; 14 | delay2 = delay1; 15 | delay1 = btnIn; 16 | end 17 | assign btnOut = delay1 & delay2 & delay3; 18 | 19 | endmodule 20 | 21 | 22 | -------------------------------------------------------------------------------- /数字逻辑实验/实验3/lab3_3/top.v: -------------------------------------------------------------------------------- 1 | `timescale 1ns / 1ps 2 | 3 | module top( 4 | input clk100mhz, 5 | input main_switch, 6 | input start_stop_switch, 7 | input high_low_switch, 8 | //input Sram_switch, 9 | input SramWrite_Read, 10 | input chooseAddr, 11 | //input SramReadEnable, 12 | input [3:0]control, 13 | inout [15:0]dataBus, 14 | output [18:0]addrBus, 15 | output chipEnable,upEnable,lowEnable, 16 | output write_read,outEnable, 17 | output [15:0]LED, 18 | output [3:0]pos, 19 | output [3:0]sop, 20 | output [7:0]seg1, 21 | output [7:0]seg2 22 | ); 23 | 24 | wire clk190hz,clk12hz,clk3hz,clk75hz,en; 25 | wire [15:0]dataBus1,dataBus2,dataBusInfo; 26 | wire [3:0]GPUcontrol; 27 | 28 | clkDiv U1(clk100mhz,clk190hz,clk12hz,clk3hz); 29 | GPU U2(clk3hz,clk12hz,main_switch,start_stop_switch,high_low_switch,GPUcontrol,en,dataBus1,dataBus2,dataBusInfo); 30 | segMsg U3(clk190hz,dataBus1,dataBus2,dataBusInfo,en,pos,sop,seg1,seg2); 31 | btnDeal U4(clk190hz,control[0],GPUcontrol[0]); 32 | btnDeal U5(clk190hz,control[1],GPUcontrol[1]); 33 | btnDeal U6(clk190hz,control[2],GPUcontrol[2]); 34 | btnDeal U7(clk190hz,control[3],GPUcontrol[3]); 35 | SRAM U8(clk100mhz,SramWrite_Read,chooseAddr,dataBus2,dataBus,addrBus,chipEnable,upEnable,lowEnable,write_read,outEnable,LED); 36 | 37 | endmodule 38 | -------------------------------------------------------------------------------- /数字逻辑实验/实验3/数字逻辑实验三.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/数字逻辑实验/实验3/数字逻辑实验三.docx -------------------------------------------------------------------------------- /数字逻辑实验/实验5/lifegame/anti_jitter.v: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/数字逻辑实验/实验5/lifegame/anti_jitter.v -------------------------------------------------------------------------------- /数字逻辑实验/实验5/lifegame/button_pointer.v: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/数字逻辑实验/实验5/lifegame/button_pointer.v -------------------------------------------------------------------------------- /数字逻辑实验/实验5/lifegame/clock_divider.v: -------------------------------------------------------------------------------- 1 | `timescale 1ns / 1ps 2 | 3 | module clock_divider( 4 | input in, 5 | output out 6 | ); 7 | 8 | parameter COUNTER_WIDTH = 1; 9 | 10 | reg [COUNTER_WIDTH - 1:0] counter = 0; 11 | 12 | always @(posedge in) begin 13 | counter <= counter + 1'b1; 14 | end 15 | 16 | assign out = counter[COUNTER_WIDTH - 1]; 17 | 18 | endmodule 19 | -------------------------------------------------------------------------------- /数字逻辑实验/实验5/lifegame/clock_divider_to_125ms.v: -------------------------------------------------------------------------------- 1 | `timescale 1ns / 1ps 2 | 3 | module clock_divider_to_125ms( 4 | input clock_100mhz, 5 | output reg clock_125ms = 0 6 | ); 7 | 8 | parameter COUNTER_MAX = 6250000; 9 | 10 | reg [25:0] counter = 0; 11 | 12 | always @(posedge clock_100mhz) begin 13 | if (counter < COUNTER_MAX - 1) begin 14 | counter <= counter + 1'b1; 15 | end else begin 16 | counter <= 0; 17 | clock_125ms <= ~clock_125ms; 18 | end 19 | end 20 | 21 | endmodule 22 | 23 | -------------------------------------------------------------------------------- /数字逻辑实验/实验5/lifegame/color_circlizer.v: -------------------------------------------------------------------------------- 1 | `timescale 1ns / 1ps 2 | 3 | module color_circlizer( 4 | input [4:0] x_position, 5 | input [4:0] y_position, 6 | input [11:0] color_in, 7 | input [11:0] color_blank, 8 | output [11:0] color_out 9 | ); 10 | 11 | parameter BLOCK_SIZE = 10; 12 | 13 | // 32 / 2 = 16 14 | wire [3:0] x = x_position > BLOCK_SIZE / 2 ? x_position - BLOCK_SIZE / 2 : BLOCK_SIZE / 2 - x_position; 15 | wire [3:0] y = y_position > BLOCK_SIZE / 2 ? y_position - BLOCK_SIZE / 2 : BLOCK_SIZE / 2 - y_position; 16 | 17 | // Use < to add some space between circles. 18 | assign color_out = x * x + y * y < (BLOCK_SIZE / 2) * (BLOCK_SIZE / 2) ? color_in : color_blank; 19 | 20 | endmodule 21 | 22 | -------------------------------------------------------------------------------- /数字逻辑实验/实验5/lifegame/color_generator.v: -------------------------------------------------------------------------------- 1 | `timescale 1ns / 1ps 2 | 3 | module color_generator( 4 | input [4:0] x_index, 5 | input [4:0] y_index, 6 | output [11:0] color 7 | ); 8 | 9 | assign color[11:8] = x_index /12+9; 10 | assign color[7:4] = y_index / 9 + 9; 11 | assign color[3:0] = x_index/16+y_index/16+7; 12 | 13 | 14 | endmodule 15 | 16 | -------------------------------------------------------------------------------- /数字逻辑实验/实验5/lifegame/gen_random.v: -------------------------------------------------------------------------------- 1 | module RanGen( 2 | input gen, 3 | input clk, 4 | output num 5 | ); 6 | 7 | reg [7:0]rand_num; 8 | reg [7:0]ran_num = 8'b10001101; 9 | 10 | assign num = rand_num[7]; 11 | 12 | always@(posedge clk or negedge gen) 13 | begin 14 | if(gen) 15 | num <=0; 16 | else 17 | begin 18 | rand_num[0] <= rand_num[7]; 19 | rand_num[1] <= rand_num[0]; 20 | rand_num[2] <= rand_num[1]; 21 | rand_num[3] <= rand_num[2]; 22 | rand_num[4] <= rand_num[3]^rand_num[7]; 23 | rand_num[5] <= rand_num[4]^rand_num[7]; 24 | rand_num[6] <= rand_num[5]^rand_num[7]; 25 | rand_num[7] <= rand_num[6]; 26 | end 27 | 28 | end 29 | endmodule 30 | -------------------------------------------------------------------------------- /数字逻辑实验/实验5/lifegame/life_game.v: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/数字逻辑实验/实验5/lifegame/life_game.v -------------------------------------------------------------------------------- /数字逻辑实验/实验5/lifegame/life_game_test.v: -------------------------------------------------------------------------------- 1 | `timescale 1ns / 1ps 2 | 3 | module life_game_test; 4 | 5 | // Inputs 6 | reg clock; 7 | reg [3:0] button; 8 | reg [9:0] x_position; 9 | reg [8:0] y_position; 10 | reg inside_video; 11 | 12 | // Outputs 13 | wire [11:0] color; 14 | 15 | // Instantiate the Unit Under Test (UUT) 16 | life_game uut ( 17 | .clock(clock), 18 | .button(button), 19 | .x_position(x_position), 20 | .y_position(y_position), 21 | .inside_video(inside_video), 22 | .color(color) 23 | ); 24 | 25 | initial begin 26 | // Initialize Inputs 27 | clock = 0; 28 | button = 0; 29 | x_position = 0; 30 | y_position = 0; 31 | inside_video = 0; 32 | 33 | // Wait 100 ns for global reset to finish 34 | #100; 35 | 36 | // Add stimulus here 37 | repeat (1000) begin 38 | #1; 39 | clock = ~clock; 40 | end 41 | end 42 | 43 | endmodule 44 | 45 | 46 | -------------------------------------------------------------------------------- /数字逻辑实验/实验5/lifegame/multiplexer_4_1.v: -------------------------------------------------------------------------------- 1 | `timescale 1ns / 1ps 2 | 3 | module multiplexer_4_1( 4 | input [3:0] in, 5 | input [1:0] select, 6 | output out 7 | ); 8 | 9 | assign out = in[select]; 10 | 11 | endmodule 12 | 13 | -------------------------------------------------------------------------------- /数字逻辑实验/实验5/lifegame/vga_controller.v: -------------------------------------------------------------------------------- 1 | `timescale 1ns / 1ps 2 | 3 | module vga_controller( 4 | input clock_25mhz, 5 | input reset, 6 | output reg h_sync, 7 | output reg v_sync, 8 | output reg inside_video, 9 | output [9:0] x_position, 10 | output [8:0] y_position 11 | ); 12 | 13 | // SYNC, BPORCH, VIDEO, FPORCH. 14 | parameter H_SYNC = 96; 15 | parameter H_BPORCH = 144; 16 | parameter H_FPORCH = 784; 17 | parameter H_TOTAL = 800; 18 | parameter V_SYNC = 2; 19 | parameter V_BPORCH = 35; 20 | parameter V_FPORCH = 511; 21 | parameter V_TOTAL = 525; 22 | 23 | reg [9:0] h_counter = 0; 24 | reg [9:0] v_counter = 0; 25 | reg v_enable = 0; 26 | 27 | always @(posedge clock_25mhz or posedge reset) begin 28 | if (reset) begin 29 | h_counter <= 0; 30 | end else if (h_counter == H_TOTAL - 1) begin 31 | h_counter <= 0; 32 | v_enable <= 1; 33 | end else begin 34 | h_counter <= h_counter + 1'b1; 35 | v_enable <= 0; 36 | end 37 | end 38 | 39 | always @(*) begin 40 | if (h_counter < H_SYNC) begin 41 | h_sync = 0; 42 | end else begin 43 | h_sync = 1; 44 | end 45 | end 46 | 47 | always @(posedge clock_25mhz or posedge reset) begin 48 | if (reset) begin 49 | v_counter <= 0; 50 | end else if (v_enable) begin 51 | if (v_counter == V_TOTAL - 1) begin 52 | v_counter <= 0; 53 | end else begin 54 | v_counter <= v_counter + 1'b1; 55 | end 56 | end 57 | end 58 | 59 | always @(*) begin 60 | if (v_counter < V_SYNC) begin 61 | v_sync = 0; 62 | end else begin 63 | v_sync = 1; 64 | end 65 | end 66 | 67 | always @(*) begin 68 | if ((h_counter >= H_BPORCH) && (h_counter < H_FPORCH) && (v_counter >= V_BPORCH) && (v_counter < V_FPORCH)) begin 69 | inside_video = 1; 70 | end else begin 71 | inside_video = 0; 72 | end 73 | end 74 | 75 | assign x_position = h_counter - H_BPORCH; 76 | assign y_position = v_counter - V_BPORCH; 77 | 78 | endmodule 79 | 80 | -------------------------------------------------------------------------------- /数字逻辑实验/实验5/实验五.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/数字逻辑实验/实验5/实验五.docx -------------------------------------------------------------------------------- /数字逻辑实验/实验5/游戏演示ppt.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/数字逻辑实验/实验5/游戏演示ppt.pdf -------------------------------------------------------------------------------- /数字逻辑实验/实验四/4.1_mealy/mealy.v: -------------------------------------------------------------------------------- 1 | module seqdetb 2 | ( input wire clk, 3 | input wire clr, 4 | input wire din, 5 | output reg dout ); 6 | reg [ 1:0 ] present_state, next_state; 7 | parameter S0 =3'b00,S1=3'b01,S2= 3'b10,S3= 3'b11; 8 | //State registers 9 | always @(posedge clk or posedge clr) 10 | begin 11 | if(clr == 1) 12 | present_state <= S0; 13 | else 14 | present_state<=next_state; 15 | end 16 | //CLANSMEN 17 | always @(*) 18 | begin 19 | case(present_state) 20 | S0: if(din == 1) 21 | next_state <=S1; 22 | else 23 | next_state <=S0; 24 | S1:if(din == 1) 25 | next_state <=S2; 26 | else 27 | next_state <=S0; 28 | S2: if(din == 0) 29 | next_state <=S3; 30 | else 31 | next_state <=S2; 32 | S3: if(din == 1) 33 | next_state <=S1; 34 | else 35 | next_state <=S0; 36 | default: next_state <=S0; 37 | endcase 38 | end 39 | always @( posedge clk or posedge clr) 40 | begin 41 | if( clr == 1) 42 | dout <=0; 43 | else 44 | if((present_state == S3)&&(din == 1)) 45 | dout <=1; 46 | else 47 | dout <= 0 ; 48 | end 49 | endmodule -------------------------------------------------------------------------------- /数字逻辑实验/实验四/4.1_mealy/test.v: -------------------------------------------------------------------------------- 1 | module seqdetb_tb; 2 | reg clk; 3 | reg clr; 4 | reg din; 5 | wire dout; 6 | parameter PERIOD=40; 7 | seqdetb u0( 8 | .clk(clk), 9 | .clr(clr), 10 | .din(din), 11 | .dout(dout) ); 12 | initial 13 | begin 14 | clk = 0; 15 | forever 16 | begin 17 | #(PERIOD/2) clk = 1; 18 | #(PERIOD/2) clk = 0; 19 | end 20 | end 21 | initial 22 | begin 23 | clr=1; 24 | forever 25 | begin 26 | #50 clr=0; 27 | end 28 | end 29 | initial 30 | begin 31 | din=1; 32 | #350 din=0; 33 | #50 din=1; 34 | #100 din=0; 35 | #50 din=1; 36 | end 37 | endmodule -------------------------------------------------------------------------------- /数字逻辑实验/实验四/4.2moore/moore.v: -------------------------------------------------------------------------------- 1 | `timescale 1ns / 1ps 2 | module seqdetea( 3 | input clk,clr,din, 4 | output reg dout 5 | ); 6 | reg [2:0] present_state,next_state; 7 | parameter S0=3'b000,S1=3'b001,S2=3'b010,S3=3'b011,S4=3'b100; 8 | always@(posedge clk or posedge clr) 9 | begin 10 | if(clr == 1) 11 | present_state<=S0; 12 | else 13 | present_state<=next_state; 14 | end 15 | 16 | always@(*) 17 | begin 18 | case(present_state) 19 | S0:if(din==1) 20 | next_state<=S1; 21 | else 22 | next_state<=S0; 23 | S1:if(din==1) 24 | next_state<=S2; 25 | else 26 | next_state<=S0; 27 | S2:if(din==0) 28 | next_state<=S3; 29 | else 30 | next_state<=S2; 31 | S3:if(din==1) 32 | next_state<=S4; 33 | else 34 | next_state<=S0; 35 | S4:if(din==0) 36 | next_state<=S0; 37 | else 38 | next_state<=S2; 39 | default:next_state<=S0; 40 | endcase 41 | end 42 | always@(*) 43 | begin 44 | if(present_state==S4) 45 | dout =1; 46 | else 47 | dout =0; 48 | end 49 | endmodule 50 | -------------------------------------------------------------------------------- /数字逻辑实验/实验四/4.2moore/test.v: -------------------------------------------------------------------------------- 1 | module seqdetb_tb; 2 | reg clk; 3 | reg clr; 4 | reg din; 5 | wire dout; 6 | parameter PERIOD=40; 7 | seqdetea u0( 8 | .clk(clk), 9 | .clr(clr), 10 | .din(din), 11 | .dout(dout) ); 12 | initial 13 | begin 14 | clk = 0; 15 | forever 16 | begin 17 | #(PERIOD/2) clk = 1; 18 | #(PERIOD/2) clk = 0; 19 | end 20 | end 21 | initial 22 | begin 23 | clr=1; 24 | forever 25 | begin 26 | #50 clr=0; 27 | end 28 | end 29 | initial 30 | begin 31 | din=1; 32 | #350 din=0; 33 | #50 din=1; 34 | #100 din=0; 35 | #50 din=1; 36 | end 37 | endmodule -------------------------------------------------------------------------------- /数字逻辑实验/实验四/4.3mearly/4.3mealy: -------------------------------------------------------------------------------- 1 | `timescale 1ns / 1ps 2 | module seqdetb( 3 | input clk, 4 | input clr, 5 | input cin, 6 | output reg dout); 7 | reg[2:0] present_state,next_state; 8 | parameter S0=3'b000,S1=3'b001,S2=3'b010,S3=3'b011; 9 | 10 | always @(posedge clk or posedge clr) begin 11 | if (clr) 12 | present_state<=S0; 13 | else 14 | present_state<=next_state; 15 | end 16 | always @(*) begin 17 | case(present_state) 18 | S0:if(cin) next_state<=S1; 19 | else next_state<=S0; 20 | S1:if(!cin) next_state<=S2; 21 | else next_state<=S1; 22 | S2:if(!cin) next_state<=S3; 23 | else next_state<=S1; 24 | S3:next_state<=S0; 25 | default:next_state<=S0; 26 | endcase 27 | end 28 | always @(*) begin 29 | if(present_state==S3&&cin==0) 30 | dout=1; 31 | else dout=0; 32 | end 33 | endmodule -------------------------------------------------------------------------------- /数字逻辑实验/实验四/4.3mearly/mearlytb.v: -------------------------------------------------------------------------------- 1 | `timescale 1ns / 1ps 2 | module seqdetb_tb; 3 | reg clk; 4 | reg clr; 5 | reg cin; 6 | wire dout; 7 | parameter period=40; 8 | seqdetb U1(clk,clr,cin,dout); 9 | initial 10 | begin 11 | clk=0; 12 | forever 13 | begin 14 | #(period/2) clk=1; 15 | #(period/2) clk=0; 16 | end 17 | end 18 | initial 19 | begin 20 | clr=1; 21 | forever 22 | begin 23 | #50 clr=0; 24 | end 25 | end 26 | initial 27 | begin 28 | cin=1; 29 | #350 cin=0; 30 | #50 cin=1; 31 | #100 cin=0; 32 | #50 cin=1; 33 | end 34 | endmodule -------------------------------------------------------------------------------- /数字逻辑实验/实验四/4.3moore/moore.v: -------------------------------------------------------------------------------- 1 | `timescale 1ns / 1ps 2 | module seqdetea( 3 | input clk, 4 | input clr, 5 | input din, 6 | output reg dout); 7 | reg[2:0] present_state,next_state; 8 | parameter S0=3'b000,S1=3'b001,S2=3'b010,S3=3'b011,S4=3'b100; 9 | 10 | always @(posedge clk or posedge clr) begin 11 | if (clr) 12 | present_state<=S0; 13 | else 14 | present_state<=next_state; 15 | end 16 | always @(*) begin 17 | case(present_state) 18 | S0:if(din) next_state<=S1; 19 | else next_state<=S0; 20 | S1:if(!din) next_state<=S2; 21 | else next_state<=S1; 22 | S2:if(!din) next_state<=S3; 23 | else next_state<=S1; 24 | S3:if(!din) next_state<=S4; 25 | else next_state<=S1; 26 | S4:if(din) next_state<=S1; 27 | else next_state<=S0; 28 | default:next_state<=S0; 29 | endcase 30 | end 31 | always @(*) begin 32 | if(present_state==S4) 33 | dout=1; 34 | else dout=0; 35 | end 36 | endmodule -------------------------------------------------------------------------------- /数字逻辑实验/实验四/4.3moore/tb.v: -------------------------------------------------------------------------------- 1 | `timescale 1ns / 1ps 2 | module seqdetb_tb; 3 | reg clk; 4 | reg clr; 5 | reg din; 6 | wire dout; 7 | parameter period=8; 8 | seqdetea U1(clk,clr,din,dout); 9 | initial 10 | begin 11 | clk=0; 12 | forever 13 | begin 14 | #(period/2) clk=1; 15 | #(period/2) clk=0; 16 | end 17 | end 18 | initial 19 | begin 20 | clr=1; 21 | forever 22 | begin 23 | #6 clr=0; 24 | end 25 | end 26 | initial 27 | begin 28 | din=1; 29 | #20 din=0; 30 | #50 din=1; 31 | #200 din=0; 32 | #50 din=1; 33 | #10$stop; 34 | end 35 | endmodule -------------------------------------------------------------------------------- /数字逻辑实验/实验四/4.4elevator/BUTTON.v: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/数字逻辑实验/实验四/4.4elevator/BUTTON.v -------------------------------------------------------------------------------- /数字逻辑实验/实验四/4.4elevator/CLKDIV.v: -------------------------------------------------------------------------------- 1 | `timescale 1ns / 1ps 2 | 3 | module clkDiv( 4 | input clk100mhz, 5 | output clk190hz, 6 | output clk3hz 7 | ); 8 | 9 | reg [25:0]count = 0; 10 | assign clk190hz = count[18]; 11 | assign clk3hz = count[25]; 12 | always @(posedge clk100mhz) count<=count+1; 13 | 14 | endmodule 15 | -------------------------------------------------------------------------------- /数字逻辑实验/实验四/4.4elevator/GPU.v: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/数字逻辑实验/实验四/4.4elevator/GPU.v -------------------------------------------------------------------------------- /数字逻辑实验/实验四/4.4elevator/SEG.v: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/数字逻辑实验/实验四/4.4elevator/SEG.v -------------------------------------------------------------------------------- /数字逻辑实验/实验四/4.4elevator/TOP.v: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/数字逻辑实验/实验四/4.4elevator/TOP.v -------------------------------------------------------------------------------- /数字逻辑实验/实验四/4.4elevator/gputb.v: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/数字逻辑实验/实验四/4.4elevator/gputb.v -------------------------------------------------------------------------------- /数字逻辑实验/实验四/实验四.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/数字逻辑实验/实验四/实验四.docx -------------------------------------------------------------------------------- /计算机组成原理/计算机组成原理实验报告/ALU/ALU.v: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/计算机组成原理/计算机组成原理实验报告/ALU/ALU.v -------------------------------------------------------------------------------- /计算机组成原理/计算机组成原理实验报告/ALU/alu_tb.v: -------------------------------------------------------------------------------- 1 | module ALU_tb; 2 | reg [1:0]ALUCtr; 3 | reg [31:0]busA,busB; 4 | wire [31:0]busW; 5 | initial begin 6 | busA=7892; 7 | busB=5631; 8 | ALUCtr=00; 9 | #5 ALUCtr=01; 10 | #5 ALUCtr=10; 11 | #5 $finish; 12 | end 13 | ALU u0(ALUCtr,busA,busB,busW); 14 | 15 | 16 | endmodule -------------------------------------------------------------------------------- /计算机组成原理/计算机组成原理实验报告/Cache_final/AreaMem.v: -------------------------------------------------------------------------------- 1 | module AreaMem(dataout,datain,address,CLR,RW); 2 | output [3:0] dataout; 3 | input [3:0] datain; 4 | input [2:0] address; 5 | input CLR; 6 | input RW; 7 | 8 | reg [3:0] data1,data2,data3,data4, 9 | data5,data6,data7,data8; 10 | reg [2:0] addr; 11 | reg [3:0] dataout; 12 | 13 | always @(*) 14 | begin 15 | if(CLR==1) 16 | begin 17 | data1 = 0; 18 | data2 = 0; 19 | data3 = 0; 20 | data4 = 0; 21 | data5 = 0; 22 | data6 = 0; 23 | data7 = 0; 24 | data8 = 0; 25 | dataout = 0; 26 | end 27 | else if(RW==0) 28 | case (addr) 29 | 3'b000:data1=datain; 30 | 3'b001:data2=datain; 31 | 3'b010:data3=datain; 32 | 3'b011:data4=datain; 33 | 3'b100:data5=datain; 34 | 3'b101:data6=datain; 35 | 3'b110:data7=datain; 36 | 3'b111:data8=datain; 37 | default:; 38 | endcase 39 | else if(RW==1) 40 | case (addr) 41 | 3'b000:dataout=data1; 42 | 3'b001:dataout=data2; 43 | 3'b010:dataout=data3; 44 | 3'b011:dataout=data4; 45 | 3'b100:dataout=data5; 46 | 3'b101:dataout=data6; 47 | 3'b110:dataout=data7; 48 | 3'b111:dataout=data8; 49 | default:; 50 | endcase 51 | end 52 | endmodule -------------------------------------------------------------------------------- /计算机组成原理/计算机组成原理实验报告/Cache_final/Cache.v: -------------------------------------------------------------------------------- 1 | module Cache( 2 | // 控制信号 3 | input T2, // 时钟信号 4 | input CLR, // 系统清零信号 5 | // 与主存通信信号 6 | input [7:0] MD, // 读数据 7 | // 与cpu通信信号 8 | input [7:0] A, // cpu给出的主存地址 9 | input RD, // cpu访问主存读信号 10 | output reg [7:0] D // Cache送cpu数据 11 | ); 12 | 13 | parameter X1 = 0; 14 | parameter X2 = 1; 15 | 16 | reg Y; //状态机 17 | wire M; //Cache失效信号 18 | wire [7:0] Cache_out; 19 | reg [7:0] Cache_in; 20 | reg [4:0] Cache_addr; //Cache地址,即CA 21 | wire Cache_RW; //Cache读写 22 | wire Area_RW; //Area读写 23 | reg [1:0] LA; //块内地址 24 | wire [2:0] Compare_addr; 25 | reg [2:0] Compare_in; 26 | 27 | 28 | always@(posedge T2) 29 | begin 30 | if(!CLR) 31 | begin 32 | if(!M) //从Cache送入cpu 33 | begin 34 | Cache_addr = A[4:0]; 35 | D = Cache_out; 36 | end 37 | else if(RD) // 从主存取数据放入 38 | begin 39 | Compare_in <= MD[7:5]; 40 | for(LA = 0; LA < 4 ; LA = LA + 1) 41 | begin 42 | Cache_addr = {A[4:0],LA[1:0]}; 43 | Cache_in = MD; 44 | end 45 | end 46 | 47 | end 48 | end 49 | 50 | 51 | always@(posedge T2) //状态机 52 | begin 53 | if(CLR) 54 | Y <= X1; 55 | else 56 | case(Y) 57 | X1: if(M) 58 | Y <= X2; 59 | else 60 | Y <= X1; 61 | X2: if(!M) 62 | Y <= X1; 63 | else 64 | Y <= X2; 65 | default: Y <= X1; 66 | endcase 67 | end 68 | 69 | assign Compare_addr = A[4:2]; //输入AreaMem的地址一直是cpu请求内存的地址 70 | assign Cache_RW = ~(Y == X2); 71 | assign Area_RW = ~(Y == X2); //从主存写入AreaMem 72 | assign RD = Y == X2 ; 73 | 74 | Compare U1 (CLR,Compare_addr,Compare_in,Area_RW,M); 75 | CacheMem U2 (Cache_out,Cache_in,Cache_addr,CLR,Area_RW); 76 | 77 | endmodule 78 | 79 | -------------------------------------------------------------------------------- /计算机组成原理/计算机组成原理实验报告/Cache_final/Cache_tb.v: -------------------------------------------------------------------------------- 1 | module Cache_tb(); 2 | reg T2; 3 | reg CLR; 4 | reg [7:0] A; 5 | reg RD; 6 | wire [7:0] D1; 7 | reg [7:0] MD; 8 | reg [7:0] D; 9 | initial 10 | begin 11 | T2=0; 12 | forever #1 T2=~T2; 13 | end 14 | initial 15 | begin 16 | CLR=1; 17 | A = 8'b1000_0001; 18 | RD = 1; 19 | MD = 8'b1111_1111; 20 | #5 CLR=0; 21 | end 22 | Cache U3(T2, CLR, MD, A ,RD, D1); 23 | endmodule -------------------------------------------------------------------------------- /计算机组成原理/计算机组成原理实验报告/Cache_final/Compare.v: -------------------------------------------------------------------------------- 1 | module Compare( 2 | input CLR, 3 | input [2:0] Compare_addr, 4 | input [2:0] Compare_in, 5 | input Area_RW, 6 | output M 7 | ); 8 | 9 | wire [3:0] Area_out; 10 | reg [2:0] Area_addr; 11 | wire V; 12 | 13 | assign V = Area_out[0]; 14 | assign M = ~(Area_out[3:1] == Compare_addr[2:0]); 15 | 16 | AreaMem U3 (Area_out,Compare_in,Compare_addr,CLR,Area_RW); //read1,write0 17 | 18 | endmodule -------------------------------------------------------------------------------- /计算机组成原理/计算机组成原理实验报告/IFU/IFU.v: -------------------------------------------------------------------------------- 1 | module IFU( 2 | input clk, 3 | input nPC_sel, 4 | input [31:0]TargetAddress, 5 | output [31:0]InstructionWord 6 | ); 7 | wire [31:0]pc; 8 | reg [31:0]pc_clk; 9 | wire [31:0]adderout; 10 | reg [31:0]InstructionMem[31:0]; 11 | 12 | integer i; 13 | initial begin 14 | for(i=0;i<32;i=i+1) 15 | InstructionMem[i]<=i; 16 | end 17 | assign pc = nPC_sel?TargetAddress:adderout; 18 | 19 | always @(posedge clk) begin 20 | pc_clk=pc; 21 | if(pc_clk>=24) pc_clk=pc_clk%4; 22 | end 23 | 24 | assign adderout = pc_clk+4; 25 | assign InstructionWord = InstructionMem[pc_clk/4]; 26 | endmodule 27 | -------------------------------------------------------------------------------- /计算机组成原理/计算机组成原理实验报告/IFU/IFU_tb.v: -------------------------------------------------------------------------------- 1 | module IFU_tb; 2 | reg clk,nPC_sel; 3 | reg [31:0]TargetAddress; 4 | wire [31:0]InstructionWord; 5 | 6 | IFU u1(clk,nPC_sel,TargetAddress,InstructionWord); 7 | 8 | initial begin 9 | clk=0; 10 | nPC_sel=1; 11 | TargetAddress=1; 12 | #2 nPC_sel=0; 13 | #20 $finish; 14 | end 15 | 16 | always begin 17 | #1 clk=~clk; 18 | end 19 | 20 | endmodule -------------------------------------------------------------------------------- /计算机组成原理/计算机组成原理实验报告/RegisterFiles/RegisterFile.v: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangrizzly/Course-Assignment/e4e413abd41fbdbb878ae84b17df0c45975cb9ff/计算机组成原理/计算机组成原理实验报告/RegisterFiles/RegisterFile.v -------------------------------------------------------------------------------- /计算机组成原理/计算机组成原理实验报告/RegisterFiles/RegisterFile_tb.v: -------------------------------------------------------------------------------- 1 | `timescale 1ns / 1ps 2 | module RegisterFile_tb; 3 | reg [4:0]ra1,ra2,wa; 4 | reg [31:0]wd; 5 | reg en_write; 6 | wire [31:0]rd1,rd2; 7 | RegisterFile rf(ra1,ra2,wa,wd,en_write,rd1,rd2); 8 | initial begin 9 | en_write=0; 10 | wd=32'b11010101110011100101001000010011; 11 | wa=5'b10110; 12 | ra1=5'bz; 13 | ra2=5'bz; 14 | #1en_write=1; 15 | #4 wa=5'b01001;en_write=0; 16 | wd=32'b01011001101011010101000110110101; 17 | #5 en_write=1; 18 | ra1=5'b10110; 19 | ra2=5'b01001; 20 | #5 $finish; 21 | end 22 | endmodule -------------------------------------------------------------------------------- /计算机组成原理/计算机组成原理实验报告/SRAM/dataMem.v: -------------------------------------------------------------------------------- 1 | module DataMemory( 2 | input clk, 3 | input [31:0]DataIn, 4 | input WrEn, 5 | input [31:0]Adr, 6 | output [31:0]Out 7 | ); 8 | reg [31:0]DM[5:0]; 9 | assign Out=WrEn?32'hzzzzzzzz:DM[Adr]; 10 | integer i; 11 | initial begin 12 | for(i=0;i<32;i=i+1) 13 | DM[i]<=0; 14 | end 15 | 16 | always @(posedge clk) begin 17 | if(WrEn) 18 | DM[Adr]<=DataIn; 19 | end 20 | endmodule -------------------------------------------------------------------------------- /计算机组成原理/计算机组成原理实验报告/SRAM/dataMem_tb.v: -------------------------------------------------------------------------------- 1 | module DataMemory_tb; 2 | reg clk; 3 | reg [31:0]DataIn,Adr; 4 | reg WrEn; 5 | wire [31:0]out; 6 | DataMemory t1(clk,DataIn,WrEn,Adr,out); 7 | initial begin 8 | WrEn=1; 9 | DataIn=32'b11010101110011100101001000010011; 10 | Adr=1; 11 | clk=0; 12 | #3 Adr=2; 13 | DataIn=32'b010100110101010000101001001010; 14 | #4 WrEn=0; Adr=1; 15 | #2 Adr=2; 16 | #2 $finish; 17 | end 18 | always begin 19 | #2 clk=~clk; 20 | end 21 | endmodule -------------------------------------------------------------------------------- /计算机组成原理/计算机组成原理实验报告/mips/ALUControl.v: -------------------------------------------------------------------------------- 1 | `timescale 1ns / 1ps 2 | module ALUControl( ALU_Control, ALUOp, Function); 3 | output reg[2:0] ALU_Control; 4 | input [1:0] ALUOp; 5 | input [3:0] Function; 6 | wire [5:0] ALUControlIn; 7 | assign ALUControlIn = {ALUOp,Function}; 8 | always @(ALUControlIn) 9 | casex (ALUControlIn) 10 | 6'b11xxxx: ALU_Control=3'b000; 11 | 6'b10xxxx: ALU_Control=3'b100; 12 | 6'b01xxxx: ALU_Control=3'b001; 13 | 6'b000000: ALU_Control=3'b000; 14 | 6'b000001: ALU_Control=3'b001; 15 | 6'b000010: ALU_Control=3'b010; 16 | 6'b000011: ALU_Control=3'b011; 17 | 6'b000100: ALU_Control=3'b100; 18 | default: ALU_Control=3'b000; 19 | endcase 20 | endmodule -------------------------------------------------------------------------------- /计算机组成原理/计算机组成原理实验报告/mips/JR_Control.v: -------------------------------------------------------------------------------- 1 | module JR_Control( 2 | input[1:0] alu_op, 3 | input [3:0] funct, 4 | output JRControl 5 | ); 6 | assign JRControl = ({alu_op,funct}==6'b001000) ? 1'b1 : 1'b0; 7 | 8 | endmodule -------------------------------------------------------------------------------- /计算机组成原理/计算机组成原理实验报告/mips/alu.v: -------------------------------------------------------------------------------- 1 | module alu( 2 | input [15:0] a, //src1 3 | input [15:0] b, //src2 4 | input [2:0] alu_control, //function sel 5 | output reg [15:0] result, //result 6 | output zero 7 | ); 8 | always @(*) //fpga4student.com: FPga projects, Verilog projects, VHDL projects 9 | begin 10 | case(alu_control) 11 | 3'b000: result = a + b; // add 12 | 3'b001: result = a - b; // sub 13 | 3'b010: result = a & b; // and 14 | 3'b011: result = a | b; // or 15 | 3'b100: begin if (a