Discover groups of similar customers using clustering. Each customer is associated with 2 attributes (X1 and X2).
QUESTION 3On the main form the btnQ3Click procedure opens th…
QUESTION 3On the main form the btnQ3Click procedure opens the form frmQuestion3. Open the unit Question3_u.For this question you may NOT use SQL statements. VRAAG 3 Maak die btnQ3Click-prosedure op die hoofvorm frmQuestion3 oop. Maak die eenheid (unit) Vraag3_u oop. Vir hierdie vraag mag jy NIE SQL-stellings gebruik nie. 3.1) Complete the btnQ3_1Click procedure.Using Delphi code filter the events table to determine how many under 20’s there were in the 2016 Olympics. Display the value with a suitable message in the memo.Example of output:Number of under 20’s in 2016 Olympics 105. (5) Voltooi die btnQ3_1Klikprosedure. Gebruik die Delphi -kode om die gebeurtenistabel te filter om vas te stel hoeveel deelnemers die onder die 20’s in die Olimpiese Spele 2016 was. Wys die waarde met ‘n geskikte boodskap in die memo. Voorbeeld van afvoer: Aantal onder 20’s in 2016 se Olimpiese Spele 105. 3.2) Complete the btnQ3_2Click procedure.Without using the filter statement, count how many Gold, Silver and Bronze medals were awarded in the year that is entered in by the user in the Edit. Clear the memo and then add a heading and then the three medals and their totals. If 2016 was entered into the edit, you would have the following output:Number of medals for 2016Gold 629Silver 619Bronze 649 (15) Voltooi die btnQ3_2Klikprosedure. Sonder om die filterverklaring te gebruik, tel hoeveel goud-, silwer- en bronsmedaljes wat toegeken is in die jaar wat die gebruiker in die redigeerblokkie (‘edit box’) ingevoer het. Maak die memo skoon en voeg dan ‘n opskrif by en dan die drie medaljes en hul totale. As 2016 in die redigeerblokkie (‘edit box’) ingevoer is, sal jy die volgende afvoer kry: Aantal medaljes vir 2016 Goud 629 Silwer 619 Brons 649
SECTION B – SQL , DATABASE AND OOP’s – TOTAL 70 MARKS AF…
SECTION B – SQL , DATABASE AND OOP’s – TOTAL 70 MARKS AFDELING B – SQL, DATABASIS EN OOP’s – TOTAAL 70 PUNTE
QUESTION 2On the main form the btnQ2Click procedure opens th…
QUESTION 2On the main form the btnQ2Click procedure opens the form frmQuestion2.Open the unit frmQuestion2_u.When you run the project you will click on the button btnQ2 to open this form.You have been provided with an Access database called Olympics.mdb. It contains 3 tables with the following structure: TABLE NAME People Events CountryCodes Primary Key PID (Integer) EventID (AutoNumber) NOC(TEXT) PName (Text) Age (Integer) region (TEXT) PGender (Text) Height(Integer) Notes (TEXT) FOREIGN KEY NOC (Text) Weight (Integer) Season (Text) Year (Integer) City (Text) Event (Text) Sport (Text) Medal (Text) FOREIGN KEY PeopleID You can click on the blue button below to open a sample of the tables in a new tab. Part of this form has already been coded. DO NOT change the provided code. You will complete the button click procedures by completing the SQL statements as per the instructions given below. The Restore Database button has been implemented, you can click it to restore the database to its original state. VRAAG 2 Maak die btnQ2Click-prosedure op die hoofvorm frmQuestion2 oop. Maak die eenheid frmQuestion2_u oop. As jy die projek uitvoer, moet jy op die knoppie btnQ2 kliek om die vorm oop te maak. Daar is ‘n Access -databasis genaamd Olympics.mdb wat jy moet gebruik. Dit bevat 3 tabelle met die struktuur soos hierbo aangedui. Jy kan op die blou knoppie hierbo klik om ‘n voorbeeld van die tabelle in ‘n nuwe tab oop te maak. ‘n Deel van hierdie vorm is reeds gekodeer. MOENIE aan die kode wat reeds gegee is verander nie. Jy moet die knoppie-klikprosedures voltooi deur die SQL-stellings te voltooi volgens die instruksies hieronder. Die Herstel databasis-knoppie is geïmplementeer. Jy kan daarop klik om die databasis na sy oorspronklike toestand te herstel.
QUESTION 1The main form called frmOlympics contains 5 button…
QUESTION 1The main form called frmOlympics contains 5 buttons. Each of these opens another form for the questions 2, 3, 4 and 5.You will work on this form (frmOlympics) to complete question 1. VRAAG 1 Die hoofvorm genaamd frmOlympics bevat 5 knoppies. Elkeen hiervan maak ‘n ander vorm oop vir vrae 2, 3, 4 en 5. Om vraag 1 te voltooi moet jy aan dié vorm (frmOlympics) werk. 1.1) Add a Listbox and 2 buttons to the form. One button’s caption should be ‘Create List’ and the other ‘Non Leap years’.Rename them appropriately. (3) Voeg ‘n “Listbox” en 2 knoppies by op die vorm. Die een knoppie moet ‘Skeplys’ en die ander ‘Nie -skrikkeljare’ genoem word. Herbenoem hulle op die regte manier. 1.2) A global variable, memDisplay of TMemo type has been declared for you.Create a user defined function called AddMemo which will dynamically create the memo and add the heading: ‘ Non Leap year Olympics’ to the memo. (10) ‘n Globale veranderlike, memDisplay van die TMemo-tipe is reeds vir jou verklaar. Skep ‘n gebruikersgedefinieerde funksie genaamd AddMemo, wat die memo dinamies sal skep en die opskrif: ‘Non -Leap year Olympics’ by die memo sal voeg.
1.3) In the ‘Create List’ button’s click procedure write the…
1.3) In the ‘Create List’ button’s click procedure write the code code to add all the years from 1896 until 2020 that we would have expected the Olympics to take place. Remember that the Olympics took place every 4 years. (We will ignore the fact that the Olympics was cancelled twice.)Your solution must use a loop to determine these numbers. (4) Skryf die kode vir die prosedure vir die ‘Skeplys’-knoppie (‘Create List’ button) om al die jare van 1896 tot 2020 by te voeg waarin die Olimpiese Spele sou plaasvind. Onthou dat die Olimpiese Spele elke 4 jaar plaasgevind het. (Ons moet die feit ignoreer dat die Olimpiese Spele twee keer afgelas is.)Jou oplossing moet ‘n lus gebruik om hierdie getalle te bepaal. 1.4) In the button ‘Non Leap years’ click procedure call your user defined procedure to add the memo to the form. Then go through the values in the listbox and count how many of those numbers are leap years, if it is not a leap year add the number to the memo. At the end display a show message dialog box which displays the number of leap years with a suitable message. (9) As die knoppie ‘Nie skrikkeljare’ (‘Non Leap years’) gedruk word, moet die gebruikers gedefinieerde prosedure geroep word om die memo by die vorm by te voeg. Gaan dan deur die waardes in die keuselys en tel hoeveel van die jaargetalle skrikkeljare is, as dit nie ‘n skrikkeljaar is nie, voeg die nommer by die memo. Vertoon aan die einde ‘n dialoogkassie (show message dialog box) met ‘n gepaste boodskap wat die aantal skrikkeljare sal aandui.
3.3) In 2016 it was discovered that the scale for the swimm…
3.3) In 2016 it was discovered that the scale for the swimming events was out by 2kg. But this was discovered only once all the contest weight had been inputted into the database. Complete the btnQ3_3Click procedure to increase the weight by 2 for all entries of the sport Swimming for the year 2016. Sample of the results.(You can reset the database by clicking on the button btnRestore)Example of adjusted values. EventID PeopleID Weight 902 465 94 1935 100 102 10288 5577 66 (8) In 2016 is ontdek dat die skaal vir die swembyeenkomste met 2 kg uit was. Maar dit is eers ontdek nadat al die gewigte van die wedstryd in die databasis ingevoer is. Voltooi die btnQ3_3 Klikprosedure om die gewig met 2 te verhoog vir alle inskrywings van die sport Swem vir die jaar 2016. Voorbeeld van die uitslae. (Jy kan die databasis herstel deur op die knoppie btnRestore te klik). Voorbeeld van aangepaste waardes. EventID PeopleID Weight 902 465 94 1935 100 102 10288 5577 66 TOTAL FOR QUESTION 3 TOTAAL VIR VRAAG 3
QUESTION 2On the main form the btnQ2Click procedure opens th…
QUESTION 2On the main form the btnQ2Click procedure opens the form frmQuestion2.Open the unit frmQuestion2_u.When you run the project you will click on the button btnQ2 to open this form.You have been provided with an Access database called Olympics.mdb. It contains 3 tables with the following structure: TABLE NAME People Events CountryCodes Primary Key PID (Integer) EventID (AutoNumber) NOC(TEXT) PName (Text) Age (Integer) region (TEXT) PGender (Text) Height(Integer) Notes (TEXT) FOREIGN KEY NOC (Text) Weight (Integer) Season (Text) Year (Integer) City (Text) Event (Text) Sport (Text) Medal (Text) FOREIGN KEY PeopleID You can click on the blue button below to open a sample of the tables in a new tab. Part of this form has already been coded. DO NOT change the provided code. You will complete the button click procedures by completing the SQL statements as per the instructions given below. The Restore Database button has been implemented, you can click it to restore the database to its original state. VRAAG 2 Maak die btnQ2Click-prosedure op die hoofvorm frmQuestion2 oop. Maak die eenheid frmQuestion2_u oop. As jy die projek uitvoer, moet jy op die knoppie btnQ2 kliek om die vorm oop te maak. Daar is ‘n Access -databasis genaamd Olympics.mdb wat jy moet gebruik. Dit bevat 3 tabelle met die struktuur soos hierbo aangedui. Jy kan op die blou knoppie hierbo klik om ‘n voorbeeld van die tabelle in ‘n nuwe tab oop te maak. ‘n Deel van hierdie vorm is reeds gekodeer. MOENIE aan die kode wat reeds gegee is verander nie. Jy moet die knoppie-klikprosedures voltooi deur die SQL-stellings te voltooi volgens die instruksies hieronder. Die Herstel databasis-knoppie is geïmplementeer. Jy kan daarop klik om die databasis na sy oorspronklike toestand te herstel.
INSTRUCTIONS INSTRUKSIES 1) Read the entire question bef…
INSTRUCTIONS INSTRUKSIES 1) Read the entire question before you start coding. Lees elke vraag noukeurig voordat jy begin met kodering. 2) Read the question carefully and do not do more than what is required. Lees elke vraag noukeurig en met ook nie meer doen as wat gevra is nie. 3) Try and get your program to compile and to run. Sometimes this means commenting code. Your commented code will still be marked. Probeer om jou program saam te stel en uit te voer. Soms beteken dit kommentaar op kode. Jou kommentaarkode sal steeds gemerk word. 4) If there is code which is commented out, and there is code that is not commented out for the same question only the uncommented code will be marked. As daar ‘n kode is waarop kommentaar gelewer word en sowel as kode vir dieselfde vraag waarop geen kommentaar gelewer word nie, sal slegs die ongekommenteerde kode gemerk word. 5) When you are finished, save your Delphi files. Click the submit button. (OR if this quiz automatically submits because you have run out of time, STOP coding and save.). A second quiz will become available, open it. (This must be done within 5 minutes of submitting this quiz). Then you will have 10 minutes to zip your project FOLDER and upload the zipped file into the new quiz. That quiz will get the marks when your test has been marked. Stoor jou Delphi -lêers as jy klaar is. Klik op die knoppie stuur. (OF as die quiz outomaties ingedien word omdat jy nie genoeg tyd het nie, stop die kodering en stoor dit.) Daar is dan ‘n tweede quiz wat jy moet oopmaak. (Dit moet binne 5 minute na die indiening van hierdie quiz oopgemaak word). Dan het jy 10 minute tyd om jou projekvouer saam te pers (te zip) en dan die saamgeperste lêer in die nuwe quiz op te laai. Dit is die quiz wat vir punte gemerk sal word.
QUESTION 5 On the main form the btnQ5Click procedure opens t…
QUESTION 5 On the main form the btnQ5Click procedure opens the form frmQuestion5.Open the unit Question5_u.For long distance race there are often more athletes than there are the number of tracks. So the athletes are ranked by qualifying times. and then given a position. For this race there are 3 lanes and 12 athletes.If Athlete A1 has the fastest time he gets track1 place 1, if athlete A2 has the second fastest time he gets track2 place 1 etc Place 1 Place 2 Place 3 Place 4 Track1 A1 A4 A7 A10 Track 2 A2 A5 A8 A11 Track 3 A3 A6 A9 A12 Read the entire question before you start coding! VRAAG 5 Op die hoofvorm maak die btnQ5Click prosedure die vorm frmQuestion5 oop.Maak die eenheid (unit) Question5_u oop.Vir die langafstande is daar baie dikwels meer atlete as wat die hoeveelheid bane dit toelaat. Atlete word geplaas volgens hulle kwalifiserende tye en hulle kry hulle posisie daarvolgens. Vir die wedloop is daar 3 bane en 12 atlete.As atleet A1 die vinnigste tyd het kry hy baan 1 en plek 1, as atleet A2 die tweede vinnigste tyd het, kry hy baan 2 en plek 1 ens. Plek 1 Plek 2 Plek 3 Plek 4 Baan 1 A1 A4 A7 A10 Baan 2 A2 A5 A8 A11 Baan 3 A3 A6 A9 A12 Lees die hele vraag noukeurig voordat jy met die kodering begin.