INFORMATIKA ANGOL NYELVEN - oktatas.hu SQL query commands should be handed in as part of the...

12
Informatika angol nyelven emelt szint — gyakorlati vizsga 1111 Azonosító jel: INFORMATIKA ANGOL NYELVEN EMELT SZINTŰ GYAKORLATI VIZSGA 2012. május 14. 8:00 A gyakorlati vizsga időtartama: 240 perc Beadott dokumentumok Piszkozati pótlapok száma Beadott fájlok száma A beadott fájlok neve NEMZETI ERŐFORRÁS MINISZTÉRIUM ÉRETTSÉGI VIZSGA 2012. május 14.

Transcript of INFORMATIKA ANGOL NYELVEN - oktatas.hu SQL query commands should be handed in as part of the...

Page 1: INFORMATIKA ANGOL NYELVEN - oktatas.hu SQL query commands should be handed in as part of the LibreOffice Base ... { Lazarus 0.9 { Dev-C++ 5 ... Informatika angol nyelven — emelt

Informatika angol nyelven emelt szint — gyakorlati vizsga 1111

Azonosító jel:

INFORMATIKA ANGOL NYELVEN

EMELT SZINTŰ

GYAKORLATI VIZSGA

2012. május 14. 8:00

A gyakorlati vizsga időtartama: 240 perc Beadott dokumentumok

Piszkozati pótlapok száma Beadott fájlok száma

A beadott fájlok neve

NEMZETI ERŐFORRÁS MINISZTÉRIUM

ÉR

ET

TS

ÉG

I V

IZS

GA

2

01

2.

jus

14

.

Page 2: INFORMATIKA ANGOL NYELVEN - oktatas.hu SQL query commands should be handed in as part of the LibreOffice Base ... { Lazarus 0.9 { Dev-C++ 5 ... Informatika angol nyelven — emelt

gyakorlati vizsga 1111 2 / 12 2012. május 14.

Informatika angol nyelven — emelt szint Azonosító jel:

Page 3: INFORMATIKA ANGOL NYELVEN - oktatas.hu SQL query commands should be handed in as part of the LibreOffice Base ... { Lazarus 0.9 { Dev-C++ 5 ... Informatika angol nyelven — emelt

gyakorlati vizsga 1111 3 / 12 2012. május 14.

Informatika angol nyelven — emelt szint Azonosító jel:

Important information You have 240 minutes to solve the practical exercises. Devices allowed for the exam: computer assigned to the candidate, paper, pen, pencil, ruler, sealed notepaper. You can take notes on the internal sides of the exercise sheet and the notepaper, these should be submitted at the end of the exam but their content will not be evaluated. The exercises can be solved in any order. Please pay attention to frequent saving (every 10 minutes); it is suggested that you save your work every time you start a new exercise. You should save your exam work in the exam directory that corresponds to your identifier. Check that the directory that corresponds with the code on the exercise sheet is accessible; if it is not accessible, notify the supervising teacher at the beginning of the exam. Save your works in the exam directory and at the end of the exam check that every solution is in the given directory because only those solutions can be evaluated. Check that the files to be submitted are readable because files that can not be opened can not be evaluated. If you solve the database-management exercise using the LibreOffice Base application, table modification SQL query commands should be handed in as part of the LibreOffice Base database file or as a separate text file. If you hand in text files, their name should unambiguously refer to their content (e.g. SQL-commands.txt), furthermore the required query name should be next to the command. The submitted program can be evaluated only if the candidate created the source file(s) that correspond to the chosen programming environment in his/her exam directory, and it contains the source codes belonging to the solution of the exercise parts. The source files can be found in the exam directory. In the case of programs that do not support the setting of dimensions in cm, use the conversion 1 cm = 40 px. It is suggested that you read through the exercises first, and then solve the individual exercise parts one by one. If your computer has technical problems, indicate it to the supervising teacher. The fact of indication and the observed problem will be recorded. The lost time will be added to the duration of the exam. If the problem is not of computer nature, the correcting teacher should take the description of the case in the record into consideration. (The system administrator can not help the candidate with the solution of the exercises.) At the end of the exam you should indicate the number and name of files created and submitted by you and located in the exam directory and its subdirectories on the first page of the exam document. When finishing the exam, do not leave the room until you have done so and have shown it to the supervising teacher. Please indicate the operating system you work with and the programming environment you use. Operating system: Windows Linux MacOS X Programming environment:

FreePascal 2.4.2 Code::Blocks/GCC Python 3.2.1+IDLE (Python GUI) Lazarus 0.9 Dev-C++ 5 Visual C# 2010 Express JAVA SE Perl 5.10 Visual Basic 2010 Express Visual Studio 2008 Professional

Page 4: INFORMATIKA ANGOL NYELVEN - oktatas.hu SQL query commands should be handed in as part of the LibreOffice Base ... { Lazarus 0.9 { Dev-C++ 5 ... Informatika angol nyelven — emelt

gyakorlati vizsga 1111 4 / 12 2012. május 14.

Informatika angol nyelven — emelt szint Azonosító jel:

1. TCP/IP model

The knowledge of network models belongs into the basics of acquiring the knowledge of networks. One of these models is the TCP/IP model, which is the standard of the Internet. Your task is to create a presentation to introduce the model based on the description and the examples.

You have to create a custom background for the presentation using files base.png and bsquare.png. During the creation of the presentation you have to work with the following files: text.txt, application.jpg, transport.jpg, internet.jpg, networking.jpg. Save your work as tcpip in the default format of the presentation program.

Creating the background

1. File bsquare.png contains a square drawn in black colour. Change the black colour into red, RGB code (255, 0, 0), and save the created square as rsquare.png.

2. Create the picture shown in the example using files bsquare.png and rsquare.png. Upon combining the two squares pay attention to the black colour being in the foreground at one point of intersection and the red colour at the other point of intersection.

3. Place the combined squares created in the previous step into the top right corner of file base.png according to the example. Create a copy of them, rotate them through 90 degrees and place the copy in the picture as well. Create 5 pairs of squares whose width is smaller than but at least half as much as the width of the original using the rotated pair of squares. Pay attention to keeping the aspect ratio. Place these into the top right part bordered by the slant line as well according to the example.

4. On the left of picture base.png create a rectangle according to the example so that it does not extend beyond the vertical auxiliary line. The height of the rectangle should be at least 650 pixels and at most 700 pixels. The border of the rectangle is black, RGB code (0, 0, 0), and its inside is red, RGB code (255, 0, 0).

5. Remove the two auxiliary lines from the created picture. Save the created picture as background.png.

Creating the presentation

6. Create a presentation that consists of 6 slides. The background of each slide is file background.png. (If you could not create file background.png, use file base.png as background.) Save the presentation as tcpip.

7. The font type of each slide is Arial (Nimbus Sans). For the titles use a font size of 50 points on the first slide and 46 points on the others. For the text on the slides use a font size of 30 points.

8. Insert the text of the slides from file text.txt, which is UTF-8 encoded, into the suitable slides. Align the titles of the slides left. Do not set a list for the text of the slides. Upon the placement of the texts pay attention to the texts not extending into the rectangle on the left of the background. (If you used base.png as the background of the slides, the texts should not extend into the region bordered by the left-hand line.)

Page 5: INFORMATIKA ANGOL NYELVEN - oktatas.hu SQL query commands should be handed in as part of the LibreOffice Base ... { Lazarus 0.9 { Dev-C++ 5 ... Informatika angol nyelven — emelt

gyakorlati vizsga 1111 5 / 12 2012. május 14.

Informatika angol nyelven — emelt szint Azonosító jel:

9. Insert the pictures into the slides – in the order given in the following table – according to the example. Set the width of each picture to 10 cm keeping the aspect ratio. The top left corner of the pictures should fit on the centre of the slides.

3rd slide application.jpg

4th slide transport.jpg 5th slide internet.jpg 6th slide networking.jpg

10. Set the same slide transition between the slides.

11. On slides 3 to 6 create an animation where the picture appears first and the text after it. During the animation the picture should appear without click and the whole text should appear on click. The animation should be such that the elements appear gradually at their place. Do not use animation for the title of the slides.

Example:

Picture background.png with the auxiliary lines of base.png

1st slide 2nd slide 3rd slide

4th slide 5th slide 6th slide

30 marks

Page 6: INFORMATIKA ANGOL NYELVEN - oktatas.hu SQL query commands should be handed in as part of the LibreOffice Base ... { Lazarus 0.9 { Dev-C++ 5 ... Informatika angol nyelven — emelt

gyakorlati vizsga 1111 6 / 12 2012. május 14.

Informatika angol nyelven — emelt szint Azonosító jel:

2. Pie

On an excursion after a long hike the form master invites everyone to eat some pies in the confectionary. In the knowledge of the student list and the pie types the teacher sums the orders to make the service faster. You have to process these data. The first row of the table shown in the example contains the pie types and the first column contains the student names. During the solution take the followings into consideration.

• You can perform auxiliary calculations to the right of the last column containing data. • Whenever possible, use a formula, function or reference in the solution in order to get the

required results even if the basic data are changed. • If in an exercise part you would like to use the results of a previous part, but you could not

solve it completely, use its solution as it is, or enter a reasonable result and work on with that. This way you can receive marks for that exercise part as well.

1. Open file piesource.txt, which is a UTF-8 encoded data file tagged by tabs, using a spreadsheet processor so that the first data gets into cell A1. Save the table as pie in the default format of the spreadsheet processor.

2. The texts in the cells of the first row are of different length, so they should be displayed rotated through 90º and with line wrapping according to the example.

3. In the cells under heading “Total” calculate the number of pies requested for each student.

4. In column “Payable” determine the cost of the order for each student based on the pie prices located in the second row and the orders of the students using a function that can be copied flawlessly.

5. The form master would like to display a mark in column “Attention” for the students who did not order any pies or ordered more than two pies. Display an exclamation mark in the corresponding cells so that it is updated if the orders change. Do not display anything in the other cells of the column.

6. The form master pays the bill of each student up to twice the price of the most expensive pie. In column “Payable” calculate the amount by which the order of each student exceeds twice the price of the most expensive pie using a function that can be copied flawlessly. The calculated value should be displayed only where it is a positive number, the other cells should be left blank.

7. In row “Pieces” determine the number of pies ordered of each type and under it, in row “Howmany” the number of students who ordered the pies.

8. In cell P3 under label “Payable” calculate the total cost of the students’ pies. Round this sum to 0 or 5 according to the current rounding rules. (According to the current rounding rules prices ending in 1 and 2 should be rounded to 0, prices ending in 3, 4, 6 and 7 should be rounded to 5, while prices ending in 8 and 9 should be rounded to 10.)

Page 7: INFORMATIKA ANGOL NYELVEN - oktatas.hu SQL query commands should be handed in as part of the LibreOffice Base ... { Lazarus 0.9 { Dev-C++ 5 ... Informatika angol nyelven — emelt

gyakorlati vizsga 1111 7 / 12 2012. május 14.

Informatika angol nyelven — emelt szint Azonosító jel:

9. Set that in cells containing currency data the numbers are displayed without decimal places, with unit “HUF”. Set the font style and the alignment of the first row and column according to the example.

10. Set a border for the order data of the students and the heading according to the example. Do not set a border for the other data.

Example:

15 marks

Page 8: INFORMATIKA ANGOL NYELVEN - oktatas.hu SQL query commands should be handed in as part of the LibreOffice Base ... { Lazarus 0.9 { Dev-C++ 5 ... Informatika angol nyelven — emelt

gyakorlati vizsga 1111 8 / 12 2012. május 14.

Informatika angol nyelven — emelt szint Azonosító jel:

3. Examinations

In the winter exam period of the academic year 2006/2007 many exams awaited the students studying information technology at the Metropolitan Free University. They had to enter for the exams electronically. The deadline for entry or the cancellation of an earlier entry was the day before the exam. The data of the entries correspond to these conditions. Those who had a valid entry received a mark on a scale of one to five. If somebody was absent from the exam, they could justify the absence after the exam. If somebody could not present an acceptable justification until the end of the exam period, they received a fail (1) mark. The data available are from the first working day after the end of the exam period, so those who had an unjustified absence have not received their fail marks yet.

1. Create a new database named examinations. You should import the three data tables supplied, which are UTF-8 encoded and tagged by tabs (student.txt, entry.txt, exam.txt), with table names that correspond to the filenames. The first lines of the files contain the field names.

2. Upon importing set the suitable types and the keys. Where the key field is missing from the data source, create it according to the structure given below.

Tables:

student (id, sname)

id the student’s identifier (text), this is the key sname the student’s name (text)

entry (id, studentid, examid, entrydate, canceldate, justified, mark)

id the identifier of the entry (autonumber), this is the key studentid the entering student’s identifier (text) examid the identifier of the exam (number) entrydate the date of the entry for the exam (date) canceldate the date of the cancellation of the entry (date), if the entry was not

cancelled, it is blank justified if the student’s absence was justified, it is true, otherwise it is false

(Boolean) mark the mark given on the exam (number), in the case of an exam not

administered yet it is blank.

exam (id, edate, subject)

id the identifier of the exam (number), this is the key edate the date of the exam (date) subject the subject that is examined at the exam (text)

Page 9: INFORMATIKA ANGOL NYELVEN - oktatas.hu SQL query commands should be handed in as part of the LibreOffice Base ... { Lazarus 0.9 { Dev-C++ 5 ... Informatika angol nyelven — emelt

gyakorlati vizsga 1111 9 / 12 2012. május 14.

Informatika angol nyelven — emelt szint Azonosító jel:

When solving the following exercises, save the solutions with the names given in brackets. Pay attention to the queries containing exactly the required fields, do not display unnecessary fields.

3. Create a query that lists the exams in 2006 of the subjects whose name contains the word or word part “logic”. The query should display the name of the subject and the date of the exam. (3logic)

4. Create a query that gives the average of the marks given for each subject. (4average)

5. Create a query that gives the names of the students who took several successful exams on one day, that is, they did not fail any on that day. (5successful)

6. At the end of the exam period the marks of students with unjustified absence are entered. Create a query that sets the marks of students who did not cancel their entry and did not justify their absence to fail. (6fail)

7. At the university the students’ scholarship depends on their average. The students receive a scholarship equalling 100 HUF times the number of hundredths by which they exceed the university average. Student average is calculated from the results of the successful exams. For calculation at least 3 successful exams are required. University average is calculated from the averages calculated this way. The following query determines the names and scholarships of students receiving a scholarship. Create query 7scholarship required for the use of this query. (7scholarship) SELECT sname, (average-(SELECT AVG(average) FROM 7scholarship))*10000 FROM 7scholarship, student WHERE studentid=student.id AND average > (SELECT AVG(average) FROM 7scholarship)

8. Create a report that displays the results of students receiving a mark on the exams of the last three calendar days of 2006 grouped by subjects. You should display the subject of the exam, the name and mark of the students entering for the exam in alphabetical order. In the query preparing the solution you should display only the fields required for the creation of the report. (8report)

30 marks

Page 10: INFORMATIKA ANGOL NYELVEN - oktatas.hu SQL query commands should be handed in as part of the LibreOffice Base ... { Lazarus 0.9 { Dev-C++ 5 ... Informatika angol nyelven — emelt

gyakorlati vizsga 1111 10 / 12 2012. május 14.

Informatika angol nyelven — emelt szint Azonosító jel:

4. Fractions

Operations on simple fractions are often required in Mathematics. Most calculators and computer programs know only decimal fractions.

Create a program that solves the following exercises connected to simple fractions. Save the source code of the program as fraction. In the exercise you have to work with positive numbers only, and the numerical data located in the file to be processed meet this criterion. You can assume that the numbers requested from the user and located in the file to be processed have at most two digits.

Display the number of the exercise before each exercise part that requires displaying information on the screen. If you request data from the user, display the kind of data you expect on the screen (for example for exercise 1: “Exercise 1: Give the numerator: ”)! Displaying the text without accents is accepted.

1. Request two numbers, the numerator and the denominator of a simple fraction from the user. Decide whether the fraction entered this way can be written as an integer. If yes, display the value as an integer, if not, display “Not an integer”.

2. Simple fractions can be simplified by dividing both their numerator and denominator by the greatest common divisor of the two numbers, the values received this way will be the new numerator and denominator. Create a recursive function for simplifying according to Euclid’s algorithm described below. Function gcd(a, b : integral numbers) : integral number if a=b then gcd := a if a<b then gcd := gcd(a, b-a) if a>b then gcd := gcd(a-b, b) End of Function

3. Bring the fraction requested in the first exercise to the simplest form using the function created. If you could not create the required function, you can use another solution to be able to solve the following exercises. Display the result in the following form: 24/32 = 3/4

If the fraction can be written as an integer, display it in this form: 24/6 = 4

4. When two simple fractions are multiplied, the product of the numerators of the two fractions gives the numerator of the result and the product of the denominators of the two fractions gives the denominator of the result. Request the numerator and the denominator of another simple fraction from the user. Multiply the fraction requested in the first exercise by this fraction. Bring the result to the simplest form and display it in the following form: 24/32 * 12/15 = 288/480 = 3/5

If the result can be written as an integer, display it in this form: 24/32 * 8/3 = 192/96 = 2

Page 11: INFORMATIKA ANGOL NYELVEN - oktatas.hu SQL query commands should be handed in as part of the LibreOffice Base ... { Lazarus 0.9 { Dev-C++ 5 ... Informatika angol nyelven — emelt

gyakorlati vizsga 1111 11 / 12 2012. május 14.

Informatika angol nyelven — emelt szint Azonosító jel:

5. When two simple fractions are added, the following steps are required:

• The two fractions should be brought to a common denominator by multiplying both the numerator and the denominator by the same number. The most reasonable common denominator is the least common multiple of the two original denominators. This will be the denominator of the sum.

• The numerators of the two fractions brought to a common denominator are added, this will be the numerator of the sum.

Create a function for this task that determines the least common multiple – using the gcd function created before – according to the following description. Function lcm(a, b : integral numbers) : integral number lcm := a * b / gcd(a, b) End of Function

6. Determine the sum of the two fractions requested using the function and display it in the following form. (If you could not create the required function, you can use another solution to be able to solve the following exercises.) 24/32 + 8/3 = 72/96 + 256/96 = 328/96 = 41/12

If the result can be written as an integer, display it in this form: 22/4 + 27/6 = 66/12 + 54/12 = 120/12 = 10

7. Perform the operations given in file data.txt and write the results in the display format given above into file results.txt. File data.txt can have at most 100 lines; it contains 4 numbers and one operator separated by a single space from each other. Only addition and multiplication operators are included.

For example: data.txt:

24 32 8 3 + 24 32 8 3 *

results.txt:

24/32 + 8/3 = 72/96 + 256/96 = 328/96 = 41/12 24/32 * 8/3 = 192/96 = 2

Sources:

1. TCP/IP model

http://gigaszhajok.com http://www.freedigitalphotos.net http://www.technet.hu/notebook/20100712/melyik_bongeszo_mit_tud/ http://indafoto.hu/jeepo/image/9660435-27ef965e/details/l/user

45 marks

38

3224 +

38

3224 ⋅

Page 12: INFORMATIKA ANGOL NYELVEN - oktatas.hu SQL query commands should be handed in as part of the LibreOffice Base ... { Lazarus 0.9 { Dev-C++ 5 ... Informatika angol nyelven — emelt

gyakorlati vizsga 1111 12 / 12 2012. május 14.

Informatika angol nyelven — emelt szint Azonosító jel:

maximum

mark achieved

mark examiner’s signature

Word processing, presentation, graphics, web page creation 1. TCP/IP model

30

Spreadsheet processing 2. Pie 15

Database management 3. Examinations 30

Algorithmization, data modelling 4. Fractions 45

Mark of the practical exam part 120

Date: ………………………. __________________________________________________________________________

elért pontszám egész számra

kerekítve / achieved mark

rounded to an integer

javító tanár aláírása / examiner’s signature

programba beírt egész pontszám /

mark written into program

as an integerSzövegszerkesztés, prezentáció, grafika, weblapkészítés/ Word processing, presentation, graphics, web page creation

Táblázatkezelés/ Spreadsheet processing

Adatbázis-kezelés/ Database management

Algoritmizálás, adatmodellezés/ Algorithmization, data modelling

jegyző / registrar Dátum / Date: ……………………….