- Home >
- Programming >
- American Military University Role of Information Technology in Democracy Essay
Description
What is the role and potential of information technology in the democratic way of life?
Minimun 250 words:
ISSC362:
Considering that there are many security concerns surrounding wireless networks, and many tools are freely available, how does and administrator or even an individual user go about ensuring the security of their wireless network? List a minimum of two methods/techniques, and explain the rational for your decision?
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.
Explanation & Answer
hello, incas...
Completion Status:
100%
Review
Review
Anonymous
Great content here. Definitely a returning customer.
Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4
24/7 Homework Help
Stuck on a homework question? Our verified tutors can answer all questions, from basic math to advanced rocket science!
Similar Content
Website templates fix
I have wordpress website. To day, i have a problem with templates. Do you experience wordpress templates. Plz help me....
Java Console Program
I need to create a console program that prompts the user to enter the name and address of their employer and position they...
java standard deviation
/*
* Write an application that creates an int array of
* size 1000000, assigns a random integer between + and
* -1...
Visual Studio Collisions
Collisions Write
a program to compute the number of collisions required in a long random
sequence of insertions using...
Quick Checkout..........................................................
A local department store hires you to write an automated checkout program to expedite customers in a hurry. The checkout l...
c++ program that prints out a users astrological sign
Write one program that prints out a users astrological sign.The program should ask a user to enter his or her birth month ...
Related Tags
Book Guides
The Restless Wave
by John McCain
The Metamorphosis
by Franz Kafka
Wuthering Heights
by Emily Brontë
The Aftermath
by Rhidian Brook
To the Lighthouse
by Virginia Woolf
Gone with the Wind
by Margaret Mitchell
Fences
by August Wilson
We Were Eight Years in Power
by Ta-Nehisi Coates
How to Win Friends and Influence People
by Dale Carnegie
Get 24/7
Homework help
Our tutors provide high quality explanations & answers.
Post question
Most Popular Content
Build a GRAPHICAL game of CHESS using C++ language
I need an expert in C++ to write me a code for a graphical version of chess. This assignment is highly important and very ...
Build a GRAPHICAL game of CHESS using C++ language
I need an expert in C++ to write me a code for a graphical version of chess. This assignment is highly important and very time sensitive, hence the very high budget I have allocated. Please only apply if you are very skilled with C++ and can write the code in the allocated time slot. Please find the requirements attached to this email. Please read the requirements carefully before accepting the request.PA8_req.pdf
C++, Binary Heap, Algorithm Development
Binary Heap Show the result of inserting 10,12,1,14,6,5,8,15,3,9,7,4,11,13, and 2 one at a time, into an initially empty ...
C++, Binary Heap, Algorithm Development
Binary Heap Show the result of inserting 10,12,1,14,6,5,8,15,3,9,7,4,11,13, and 2 one at a time, into an initially empty binary heap. Show the result of using the linear-time algorithm to builde a binary heap using the same input. Show the result of performing three deleteMin operations in the heap of the previous exercise. Type and save your work in a document and upload.
Priority Queue in C++
Priority QueueShow an example of a priority queue.Note: either use one from your work experience or research one.Sha ...
Priority Queue in C++
Priority QueueShow an example of a priority queue.Note: either use one from your work experience or research one.Share & Explain the situation where your example is utilized.Discuss why a priority queue benefits the users in this situation.
Class Re-Use, Visual Basic
Class Re-UseList and describe benefits and drawbacks of class re-use. Justify your answer. Give detailed examples fr ...
Class Re-Use, Visual Basic
Class Re-UseList and describe benefits and drawbacks of class re-use. Justify your answer. Give detailed examples from your experiences.
Please fix the bug in the code.
Code is complete but there is a bug when it compiles. Please fix the bug and then I will accept your bid. This is very urg ...
Please fix the bug in the code.
Code is complete but there is a bug when it compiles. Please fix the bug and then I will accept your bid. This is very urgent. I only have one hour!!--------------------------------------------------------------------------------------------------#ifndef CHESST01_H_INCLUDED#define CHESST01_H_INCLUDED #include<string>using namespace std;class Piece{ private: string itsName; int itsVertAddress; int itsHorzAddress; public: void setItsVertAddress (int address){itsVertAddress = address;} void setItsHorzAddress (int address){itsHorzAddress = address;} int getItsVertAddress() {return itsVertAddress;} int getItsHorzAddress() {return itsHorzAddress;} void setItsName (string name){itsName=name;} string getItsName () {return itsName;}};class Board{ private: string itsBoard[26]; public: void setItsBoard(string []); void setPcsLoc(string,int,int); void DisplayBoard(); bool emptySpot(int ,int );};///////////////////// bool searchTouch(Piece [],int);// bool searchMove(Piece [],int,int);/////////////////////void Board::setItsBoard(string arr[]){ for(int i=0;i<26;i++) itsBoard[i]=arr[i];}void Board::DisplayBoard(){ for(int i=0;i<26;i++) cout<<itsBoard[i]<<endl;;}void Board::setPcsLoc(string name,int horz,int vert){ itsBoard[vert].replace(horz,2,name);}bool Board::emptySpot(int horz,int vert){ cout<<"\n"<<itsBoard[horz][vert]<<endl; if(itsBoard[horz][vert]=='.') { return true; } return false;}/* bool searchTouch(Piece pieces[],int address) ////to check if the player is choosing the right Piece { bool ok_touch = false; int Horz = address%10; int Vert = address/10; for(int i=0;i<32;i++) if((pieces[i].getItsHorzAddress()==Horz)&&(pieces[i].getItsVertAddress()==Vert)) return ok_touch; return ok_touch; } bool searchMove(Piece pieces[],int addtouch,int addmove) ////to check if the player is choosing the right Piece { bool ok_touch = false; int THorz = addtouch%10; int TVert = addtouch/10; int MHorz = addmove%10; int MVert = addmove/10; for(int i=0;i<32;i++) if((pieces[i].getItsHorzAddress()==THorz)&&(pieces[i].getItsVertAddress()==TVert)) { pieces[i].setPcsLoc(pieces[i].getItsName(),MHorz,MVert); return ok_touch; } return ok_touch; } */#endif // CHESST01_H_INCLUDED #include<iostream> #include<string> #include<cstdlib> #include"chess.h" bool touchMove(Board*,Piece [],int,int,bool); bool checkMove(int); bool emptySpot(Piece [],int , int); bool pieceMove(Piece [],string ,string ,int ,int ); int switchNum(int,char); void resetBoard(Board *,Piece []); using namespace std; int main() { ///// 2 6 10 14 18 22 26 30 string arrPcs[26]={"--1---2---3---4---5---6---7---8---", "- #### #### #### ####-", "1 #### #### #### ####1",//2 "- #### #### #### ####-", "-#### #### #### #### -", "2#### #### #### #### 2",//5 "-#### #### #### #### -", "- #### #### #### ####-", "3 #### #### #### ####3",//8 "- #### #### #### ####-", "-#### #### #### #### -", "4#### #### #### #### 4",//11 "-#### #### #### #### -", "- #### #### #### ####-", "5 #### #### #### ####5",//14 "- #### #### #### ####-", "-#### #### #### #### -", "6#### #### #### #### 6",//17 "-#### #### #### #### -", "- #### #### #### ####-", "7 #### #### #### ####7",//20 "- #### #### #### ####-", "-#### #### #### #### -", "8#### #### #### #### 8",//23 "-#### #### #### #### -", "--1---2---3---4---5---6---7---8---" }; Board gameBoard; gameBoard.setItsBoard(arrPcs ); Piece pcs[64]; resetBoard(&gameBoard,pcs); gameBoard.DisplayBoard();/////display the game board on screen cout<<"0 to end the game anytime"<<endl; cout<<"entry:2 digits each from 1-8.first: vertical count"<<endl; bool exit = false; bool white= true; //////the turn is for white cout<<"White Turn"<<endl;while(exit==false){int touch,move;cout<<"Choose the piece you want to move!"<<endl;cin>>touch;if(touch!=0){cout<<"CHoose the target location "<<endl;cin>>move;if((checkMove(move))&&(checkMove(touch))&&(touchMove(&gameBoard,pcs,touch,move,white))){ gameBoard.DisplayBoard();/////display the game board on screen if(white) { white=false;/////switch player cout<<"Black Turn"<<endl; } else { white=true; cout<<"White Turn"<<endl; }} else cout<<"not accepted"<<endl;}elseexit=true;} return 0; } bool touchMove(Board *aboard,Piece pieces[],int addtouch,int addmove,bool white) //// { string nameT,nameM; bool ok_touch = false; int THorz = addtouch%10; int TVert = addtouch/10; int MHorz = addmove%10; int MVert = addmove/10; THorz=switchNum(THorz,'h'); MHorz=switchNum(MHorz,'h'); TVert=switchNum(TVert,'v'); MVert=switchNum(MVert,'v');for(int i=0;i<=64;i++)//searching for the touched piece if((pieces[i].getItsHorzAddress()==TVert)&&(pieces[i].getItsVertAddress()==THorz)&&(pieces[i].getItsName()!=" ")) { nameT=pieces[i].getItsName(); if((white)&&(nameT[0]=='W')) ////white can move white only { for(int k=0;k<=64;k++)////searching for the target if((pieces[k].getItsHorzAddress()==MVert)&&(pieces[k].getItsVertAddress()==MHorz)) { nameM=pieces[k].getItsName(); if((white)&&(nameM[0]!='W')) { if(pieceMove(pieces,nameT,nameM,addtouch,addmove))////////////fuction for the rules of each piece movement { pieces[k].setItsName(pieces[i].getItsName()); aboard->setPcsLoc(pieces[k].getItsName(),MHorz,MVert); pieces[i].setItsName(" "); aboard->setPcsLoc(pieces[i].getItsName(),THorz,TVert); ok_touch=true; }/////////////////////////////////////////////////// } } } else if ((!white)&&(nameT[0]=='B')) ////black can move black only { for(int k=0;k<=64;k++) ///////searching for the touched piece if((pieces[k].getItsHorzAddress()==MVert)&&(pieces[k].getItsVertAddress()==MHorz)) { nameM=pieces[k].getItsName(); if((!white)&&(nameM[0]!='B')) { /////////////////////////////////////////////////// if(pieceMove(pieces,nameT,nameM,addtouch,addmove))////////////fuction for the rules of each piece movement { pieces[k].setItsName(pieces[i].getItsName()); aboard->setPcsLoc(pieces[k].getItsName(),MHorz,MVert); pieces[i].setItsName(" "); aboard->setPcsLoc(pieces[i].getItsName(),THorz,TVert); ok_touch=true; } ////////////////////////////////////////////////////////// } } } else ok_touch=false; } return ok_touch; } int switchNum(int num,char xChar) { if(xChar=='h') switch(num) { case 1 : num =2; break; case 2 : num =6; break; case 3 : num =10; break; case 4 : num =14; break; case 5 : num =18; break; case 6 : num =22; break; case 7 : num =26; break; case 8 : num =30; break; default : break; } else switch(num) { case 1 : num =2; break; case 2 : num =5; break; case 3 : num =8; break; case 4 : num =11; break; case 5 : num =14; break; case 6 : num =17; break; case 7 : num =20; break; case 8 : num =23; break; default : break; } return num; } void resetBoard(Board *gameBoard,Piece pcs[]) { for(int i=0,j=2;i<8;i++) { pcs[i].setItsName("WP"); pcs[i].setItsVertAddress(j); pcs[i].setItsHorzAddress(5); gameBoard->setPcsLoc(pcs[i].getItsName(),j,5); j+=4; } for(int i=8,j=2;i<16;i++) { pcs[i].setItsName("BP"); pcs[i].setItsVertAddress(j); pcs[i].setItsHorzAddress(20); gameBoard->setPcsLoc(pcs[i].getItsName(),j,20); j+=4; }/////set rook locations for(int i=16,j=2;i<18;i++) { //////set location for white rook pcs[i].setItsName("WR"); pcs[i].setItsVertAddress(j); pcs[i].setItsHorzAddress(2); gameBoard->setPcsLoc(pcs[i].getItsName(),j,2); ////set location for black rook pcs[i+2].setItsName("BR"); pcs[i+2].setItsVertAddress(j); pcs[i+2].setItsHorzAddress(23); gameBoard->setPcsLoc(pcs[i+2].getItsName(),j,23); j=30; } /////set Knight locations for(int i=20,j=6;i<22;i++) { //////set location for white knight pcs[i].setItsName("WN"); pcs[i].setItsVertAddress(j); pcs[i].setItsHorzAddress(2); gameBoard->setPcsLoc(pcs[i].getItsName(),j,2); ////set location for black knight pcs[i+2].setItsName("BN"); pcs[i+2].setItsVertAddress(j); pcs[i+2].setItsHorzAddress(23); gameBoard->setPcsLoc(pcs[i+2].getItsName(),j,23); j=26; } /////set Bishops locations for(int i=24,j=10;i<26;i++) { //////set location for white bishop pcs[i].setItsName("WB"); pcs[i].setItsVertAddress(j); pcs[i].setItsHorzAddress(2); gameBoard->setPcsLoc(pcs[i].getItsName(),j,2); ////set location for black bishop pcs[i+2].setItsName("BB"); pcs[i+2].setItsVertAddress(j); pcs[i+2].setItsHorzAddress(23); gameBoard->setPcsLoc(pcs[i+2].getItsName(),j,23); j=22; } /////set Queens locations //////set location for white queen pcs[28].setItsName("WQ"); pcs[28].setItsVertAddress(14); pcs[28].setItsHorzAddress(2); gameBoard->setPcsLoc(pcs[28].getItsName(),14,2); ////set location for black queen pcs[29].setItsName("BQ"); pcs[29].setItsVertAddress(14); pcs[29].setItsHorzAddress(23); gameBoard->setPcsLoc(pcs[29].getItsName(),14,23); /////set kings locations //////set location for white king pcs[30].setItsName("WK"); pcs[30].setItsVertAddress(18); pcs[30].setItsHorzAddress(2); gameBoard->setPcsLoc(pcs[30].getItsName(),18,2); ////set location for black king pcs[31].setItsName("BK"); pcs[31].setItsVertAddress(18); pcs[31].setItsHorzAddress(23); gameBoard->setPcsLoc(pcs[31].getItsName(),18,23);/////////////set the other spotsint k=8; for(int i=32,j=2;i<64;i++) { //////set location for white knight pcs[i].setItsName(" "); pcs[i].setItsVertAddress(j); pcs[i].setItsHorzAddress(k); gameBoard->setPcsLoc(pcs[i].getItsName(),j,k);if(j<30)j+=4;else{j=2;k+=3;} } }bool checkMove(int move){ int first = move/10; int second = move%10; if((first<1)||(first>8)||(second<1)||(second>8)) return false; return true;}bool pieceMove(Piece pieces[],string nameT,string nameM,int touch ,int move ){ int moving=touch; int THorz = touch%10; int TVert = touch/10; int MHorz = move%10; int MVert = move/10; int movingH=THorz; int movingV=TVert; int diff=abs(touch-move); int signedDiff=touch-move; if(nameT[1]=='P') ////if its pawn { if(nameT[0]=='W')//////white pawn { if(nameM[0]==' ')//////////////piece not attacking { if(move==touch+10)////one step forward ? return true;//yes? go return false;//no ? not accepted } else if(nameM[0]!=' ')////attacking abviously black piece if((move==touch+11)||(move==touch+9)) //moving diagonal down? return true; /////diagonal return false;/////not diagonal } if(nameT[0]=='B')//////black pawn { if(nameM[0]==' ')//////////////piece not attacking { if(move==touch-10)////one step up return true;/////up ok return false;/////not up not accepted } if(nameM[0]!='.')////attacking abviously white piece if((move==touch-11)||(move==touch-9)) ////diagonal up return true;/////ok move return false;////not accepted } return false;////any unexpected mistake will return a non accepted move }///////////////////////////////////////////////////////////////////end of pawn statment ////////////knight if(nameT[1]=='N') { int Hdiff=abs(THorz-MHorz); int Vdiff=abs(TVert-MVert); cout<<"Hdiff and Vdiff are "<<Hdiff<<" "<<Vdiff<<endl; if(((Hdiff==1)&&(Vdiff==2))||((Hdiff==2)&&(Vdiff==1))) return true; return false; } ////////////////////////////////////////////////////////////////////end night statement if(nameT[1]=='K') { if((diff==1)||(diff==11)||(diff==9)||(diff==10))////one step any direction return true; /////good move return false;////not accepted //////king } else if(nameT[1]=='R') { if((movingH==MHorz)||(movingV==MVert)) ////if its vertical or horizontal moving rook or queen { ////while loop to the check that there are no objects to block the moving objects's way while(moving!=move) ////the while loop ends if we reach the target { if(movingH>MHorz)//theobjects is moving to the left movingH--; if(movingH<MHorz)////right direction movingH++; if(movingV>MVert)//theobjects is moving Down movingV--; if(movingV<MVert)////Up direction movingV++; ////after we move and before we accept the movement we need to check if ////there is no object is blocking the way of our moving object moving=movingV*10+movingH; if(moving!=move) if(!emptySpot(pieces,switchNum(movingH,'h'),switchNum(movingV,'v'))) return false; ////if an object is found the movement cant be done } ////if the while loop ends it means the path is clear and its ok to move return true; } else return false; } /////////different selection if(nameT[1]=='B') { if((diff%9==0)||(diff%11==0)) ////if its diagonal moving bishop or queen { ////while loop to the check that there are no objects to block the moving objects's way while(moving!=move) ////the while loop ends if we reach the target { if((MHorz>THorz)&&(MVert>TVert))//theobjects is moving to the left { movingH++; movingV++; } if((MHorz<THorz)&&(MVert<TVert))////right direction { movingH--; movingV--; } if((MHorz>THorz)&&(MVert<TVert))////right direction { movingH++; movingV--; } if((MHorz<THorz)&&(MVert>TVert))////right direction { movingH--; movingV++; } ////after we move and before we accept the movement we need to check if ////there is no object is blocking the way of our moving object moving=movingV*10+movingH; if(moving!=move) if(!emptySpot(pieces,switchNum(movingH,'h'),switchNum(movingV,'v'))) return false; ////if an object is found the movement cant be done } ////if the while loop ends it means the path is clear and its ok to move return true; } else return false; } if(nameT[1]=='Q') { if((movingH==MHorz)||(movingV==MVert)) ////if its vertical or horizontal moving rook or queen { ////while loop to the check that there are no objects to block the moving objects's way while(moving!=move) ////the while loop ends if we reach the target { if(movingH>MHorz)//theobjects is moving to the left movingH--; if(movingH<MHorz)////right direction movingH++; if(movingV>MVert)//theobjects is moving Down movingV--; if(movingV<MVert)////Up direction movingV++; ////after we move and before we accept the movement we need to check if ////there is no object is blocking the way of our moving object moving=movingV*10+movingH; if(moving!=move) if(!emptySpot(pieces,switchNum(movingH,'h'),switchNum(movingV,'v'))) return false; ////if an object is found the movement cant be done } ////if the while loop ends it means the path is clear and its ok to move return true; } if((diff%9==0)||(diff%11==0)) ////if its diagonal moving bishop or queen { ////while loop to the check that there are no objects to block the moving objects's way while(moving!=move) ////the while loop ends if we reach the target { if((MHorz>THorz)&&(MVert>TVert))//theobjects is moving to the left { movingH++; movingV++; } if((MHorz<THorz)&&(MVert<TVert))////right direction { movingH--; movingV--; } if((MHorz>THorz)&&(MVert<TVert))////right direction { movingH++; movingV--; } if((MHorz<THorz)&&(MVert>TVert))////right direction { movingH--; movingV++; } ////after we move and before we accept the movement we need to check if ////there is no object is blocking the way of our moving object moving=movingV*10+movingH; if(moving!=move) if(!emptySpot(pieces,switchNum(movingH,'h'),switchNum(movingV,'v'))) return false; ////if an object is found the movement cant be done } ////if the while loop ends it means the path is clear and its ok to move return true; } }return false;}bool emptySpot(Piece pieces[],int h, int v){ for(int i=0;i<=64;i++) if((pieces[i].getItsHorzAddress()==v)&&(pieces[i].getItsVertAddress()==h)&&(pieces[i].getItsName()==" ")) return true; return false;}
Earn money selling
your Study Documents