עמוד:129

< % ! int extraPoints = 0 ; % > < % ! String name ; % > < % ! Random rand = null ; % > < % ! int n 1 = -1 , n 2 = -1 , n 3 = -1 ; % > < % @ page import = "java . util . Random" % > boolean isSubmitPressed ( HttpServletRequest request ) { < % ! האם כפתור נלחץ if ( rand == null ) { void drawLots () { } return ( request . getParameter ( "send" ) ! = null ); // יצירת עצם מטיפוס } rand = new Random (); // Random הגרלת מספרים אקראיים } n 3 = 1 + rand . nextInt ( 9 ); n 2 = 1 + rand . nextInt ( 9 ); n 1 = 1 + rand . nextInt ( 9 ); // חישוב הניקוד drawLots (); int tempPoints = 2 ; int calculatePoints ( HttpServletRequest request ) { // האם שלושת המספרים זהים } tempPoints = 10 ; if ( n 1 == n 2 && n 2 == n 3 ) { // < link rel = "Stylesheet" type = "text / css" href = "chap 3 . css" /> < title > Game Activity 5 < head id = "Head 1 " > < html > % > } return tempPoints ;

מטח : המרכז לטכנולוגיה חינוכית


לצפייה מיטבית ורציפה בכותר