TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
Ip project
1. DELHI PUBLIC SCHOOL, VIJAYAWADA
DEPARTMENT OF COMPUTER SCIENCE
CERTIFICATE
This is to certify that, this is the bonafied record of project
work done in INFORMATICS PRACTICES(065) Laboratory
during the academic year 2015-16 by Mr./Ms. ANURAG SURYA.V
of class XII with Registration No. .…………………………….
Teacher In charge PRINCIPAL
2. External Examiner
ANALYSIS AND DESIGN OF
EL GREYMATTER
[PROJECT REPORT]
Particulars of the student:
Name: ANURAG SURYA.V
Class: XII Bi.P.C
Particulars of the Supervisor:
Name: Mr. J.SESHAGIRI
Designation: HOD Computer Science,
DPS, Vijayawada.
3. ACKNOWLEDGEMENT
It is with great pleasure that I find myself penning down these
lines to express my sincere thanks to various people who helped me
a long way in completing this project.
The harmonious climate in our school provided proper guide for
preparing the project .It was a privilege to have been guided by Mr.
J.SESHAGIRI
Thanks to all my classmates who helped me during the development
of this project with their constructive criticism and advice.
VIJAYAWADA
XII- Bi.P.C
4. ABSTRACT
WHO WANTS TO BE A MILLIONAIRE? is a sensational game
show. For the thrill it offers to the viewers and the sum of amount it gifts
the participants. It promises a adrenaline rush for everyone and at the
same time it also improves our General Knowledge. The show is a life
changing platform for the doers. Here, we bring you the goodness of
such life changing experience in the form of app. This app offers the
user, rather player, a similar experience as such on the hot seat.
Although, the app is names El Greymatter as it tests your GK as well as
your thinking ability, in situations.
By running this app you go through a series of 15 questions, each
question offering you some amount. If the question is unanswerable you
can take help of the two help lines present.
Each help line works only once. To play the game you have to first give
your name at the opening page and then get on an answering streak.
5. HOMEPAGE:
This is the homepage of the APP. You have to enter your name in the jTextfield, it’ll be
saved in the database (MySQL) in two tables. One is “pro” which saves the player name and the
other “questions” which save the amount won by the player based on the no of questions he/she
answered.
By clicking on “CONTINUE”, you’ll be able to start the game. The code for
“CONTINUE” button is:
String name=tfname.getText();
JOptionPane.showMessageDialog(this,"WECOME "+name+".CLICK OK TO CONTINUE.");
JOptionPane.showMessageDialog(this,"ALL THE BEST.");
if (name.isEmpty())
JOptionPane.showMessageDialog(this,"PLEASE ENTER YOUR NAME.");
7. QUESTION PAGE:
This is the sample page for a button. The amount you are answering
the question for will be highlighted with a white frame and the amount you’ve won
with a green frame above. If you click on the “correct option button” you’ll be
8. forwarded to next question, each page contains 3 wrong answers buttons and 1
right answer button (for example, in the first form above button “31 DECEMBER
2000” is the correct answer choosing that will proceed to next answer form Q2).
Else, if you don’t know the answer for the question, you can flip it using the
“FLIP” button (you can flip a question only once in a game). If the answer is
wrong, the game is terminated, i.e, you chose the wrong answer using the “wrong
answer button”, you lose all your money by selecting a wrong option. You can also
quit the game, using “QUIT” button. You’ll lose everything till question 6 and gain
as much as earned after you cross question 6.
RIGHT ANSWER BUTTON:
int b=1000;
try
{
Class.forName("java.sql.DriverManager");
com.mysql.jdbc.Connection
c=(com.mysql.jdbc.Connection)DriverManager.getConnection("jdbc:mysql://local
host:3306/PRO","root","12345");
com.mysql.jdbc.Statements=(com.mysql.jdbc.Statement)c.createStatement();
String a="select namefrom pro;";
String name=null;intfound=0;
ResultSet rs=s.executeQuery(a);
while(rs.next())
{name=rs.getString(1);
found++;}
12. com.mysql.jdbc.Statement s1=(com.mysql.jdbc.Statement)c.createStatement();
String q="updatequestions set score='160000(QUITSAT QUESTION 10)' where
name='"+name+"';";;
s1.executeUpdate(q);
}
catch (Exception e)
{
JOptionPane.showMessageDialog(null,e.getMessage());
}
System.exit(0);
A dialog of such is displayed based on the amount you win
(here,160000).
FLIP BUTTON:
QA1 a=new QA1();
a.setVisible(true);
this.setVisible(false);
13. Here, the actual question in form “Q1” is replaced by an
alternate question in form “QA1”.
To stop “FLIP” from appearing multiple times the following
code is used in every form’s “correct answer buttons”:
a.setVisible(true);
this.setVisible(false);
Q2 acd=new Q2();
acd.b1.setVisible(false);
Q3 aa=new Q3();
aa.b1.setVisible(false);
Q4 ab=new Q4();
ab.b1.setVisible(false);
Q5 ac=new Q5();
ac.b1.setVisible(false);
Q6 ad=new Q6();
ad.b1.setVisible(false);
Q7 ae=new Q7();
ae.b1.setVisible(false);
Q8 af=new Q8();
af.b1.setVisible(false);
Q9 ag=new Q9();
ag.b1.setVisible(false);
Q10 ah=new Q10();
ah.b1.setVisible(false);
Q11 ai=new Q11();
ai.b1.setVisible(false);
Q12 aj=new Q12();
aj.b1.setVisible(false);
Q13 ak=new Q13();
ak.b1.setVisible(false);
Q14 al=new Q14();
al.b1.setVisible(false);
Q15 am=new Q15();
am.b1.setVisible(false);
25. CONCLUSION
Kaun BanegaCrorepati (Who will become a Millionaire; popularly
known as KBC) is an Indian television game show originally aired on Star Plus
commissioned by the programming team of Sameer Nair and Tarun Katial.
While based on the UK game show Who Wants to Be a Millionaire?, KBC
intersperses the playing of the game with Bollywood style musicalnumbers and
other entertainment.
This app offers the users, rather gamers, a virtual experience like “who wants to
be a millionaire?” or ” Kaun Banega Crorepati ”with a parallel sector of it
improving the G.K of the player. Itcan played by anyoneall they need to do is just
type their name and get on an answering streak.