Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into hf2024webapi
Browse files Browse the repository at this point in the history
  • Loading branch information
AttilaHideg committed Oct 21, 2024
2 parents 67d48a7 + a39229b commit 75342de
Show file tree
Hide file tree
Showing 19 changed files with 92 additions and 43 deletions.
5 changes: 4 additions & 1 deletion docs/en/homework/adonet/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Exercise: ADO.NET data access

This exercise is optional. You may earn **2 points** by completing this exercise.
!!! important "IMPORTANT"
Revoked from 2024!

You may earn **2 points** by completing this exercise.

Use GitHub Classroom to get your git repository. You can find the **invitation link in Moodle**. Clone the repository created via the link. It contains a skeleton and the expected structure of your submission. After completing the exercises and verifying them, commit and push your submission.

Expand Down
2 changes: 1 addition & 1 deletion docs/en/homework/ef/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Exercise: Entity Framework

You may earn **2 points** by completing this exercise.
You may earn **4 points** by completing this exercise.

Use GitHub Classroom to get your git repository. You can find the **invitation link in Moodle**. Clone the repository created via the link. It contains a skeleton and the expected structure of your submission. After completing the exercises and verifying them, commit and push your submission.

Expand Down
5 changes: 3 additions & 2 deletions docs/en/homework/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Homework

With these exercises you can earn **points** that are added to your exam score. Maximum 4 points per homework. In the exercises and the evaluation results, you will see a text “iMsc”; these iMsc points are not counted! (These are special points for Hungarian curriculum). All non-iMsc exercises are available for points on this course, 5 homeworks, maximum 4 points per homework, maximum 20 points. Here you find the exercise descriptions; the submission of the solutions is expected via GitHub Classroom. If you fail to submit the exercies exactly as in the guide, or it is late, you get no points at all! Make sure to follow the guide and do **everything in time**!
With these exercises you can earn **points** that are added to your exam score. Maximum 4 points per homework. In the exercises and the evaluation results, you will see a text “iMsc” for optional excerciser; these iMsc points are not counted! (These are special points for Hungarian curriculum). All non-iMsc exercises are available for points on this course, 5 homeworks, maximum 4 points per homework, maximum 20 points. Here you find the exercise descriptions; the submission of the solutions is expected via GitHub Classroom. If you fail to submit the exercies exactly as in the guide, or it is late, you get no points at all! Make sure to follow the guide and do **everything in time**!

!!! important "Working code"
You are expected to write code that actually works! Your code will be executed, and it is required to fulfill the specified task.
Expand All @@ -10,7 +10,8 @@ With these exercises you can earn **points** that are added to your exam score.
1. [MSSQL server-side programming](mssql/index.md)
1. [Entity Framework](ef/index.md)
1. [MongoDB](mongodb/index.md)
1. [REST API and Web API](rest/index.md)
1. REST API and Web API
1. GraphQL

## Submission

Expand Down
27 changes: 24 additions & 3 deletions docs/en/homework/mongodb/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Exercise: MongoDB

This exercise is optional. You may earn **2 points** by completing this exercise.
You may earn **4 points** by completing this exercise.

Use GitHub Classroom to get your git repository. You can find the **invitation link in Moodle**. Clone the repository created via the link. It contains a skeleton and the expected structure of your submission. After completing the exercises and verifying them, commit and push your submission.

Expand Down Expand Up @@ -65,7 +65,28 @@ There are unit tests available in the solution. You can [run the unit tests in V

The image does not need to show the exact same source code that you submit; there can be some minor changes. If the tests run successfully and you create the screenshot, then later you make some **minor** change to the source, there is no need for you to update the screenshot.

## Exercise 2 optional: Estimating storage space (0 points)
## Exercise 2: Insert a New Product (2 points)

The task is to create a function for inserting a new product. Several conditions must be met during the insertion, which need to be checked before the operation. Implement the `InsertProduct(string name, string category, int vat)` function.

The following conditions should be considered during insertion:

- If a product with the given name already exists, throw an exception (`ArgumentException`).
- If the specified category does not yet exist, throw an exception (`ArgumentException`).
- If the given `vat` value is already associated with the name of another `Product` instance, use that name; otherwise, assign the name `"VAT"` to the product being inserted.

1. Extend the repository class constructor to include categories. To do this, add the corresponding class for the category!

1. Implement the function, ensuring that the parameter constraints are checked before performing the insertion! The tests in the `TestExercise2.cs` file will assist you.

1. The product dimensions should be 1x1x1 cm, and for other unspecified variables, you may choose any valid value.

!!! example "SUBMISSION"
Upload the modified C# source code!

Additionally, take a screenshot similar to the one in the first task, where you have run the relevant tests! Save the image as `f2.png` and upload it as part of your solution!

## Exercise 3 optional: Estimating storage space (0 points)

The company is moving to a new location. We need to know whether the current stock can be moved and will fit into the new storage facility. Implement the method that calculates the **total volume of all products in stock**!

Expand Down Expand Up @@ -93,7 +114,7 @@ The required parts of the products are not mapped to C# classes yet. You need to
!!! warning "Use Fluent Api"
You must use the C# Fluent Api! Do not write the query using `BsonDocument`!

You may test your implementation with the tests provided in class `TestExercise2`. The tests presume that the database is in its initial state.
You may test your implementation with the tests provided in class `TestExercise3`. The tests presume that the database is in its initial state.

!!! example "SUBMISSION"
Upload the changed C# source code.
4 changes: 2 additions & 2 deletions docs/en/homework/mssql/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,6 @@ We want to extract the `recommended_age` and move it to a new column in the tabl
1. Create a T-SQL script that extracts the content of the `<recommended_age>` tag from the xml and moves the value into the `RecommendedAge` column of the table. If the xml description is empty or there is no `<recommended_age>` tag, the column's value should be `NULL`. Otherwise, take the tag's text content (without the tag name), copy the value into the column, and remove the tag from the xml. You can presume that there is at most one `<recommended_age>` element in the xml.

!!! example "SUBMISSION"
Submit the T-SQL code in file `f2.sql`. Do not use a stored procedure in this exercise; create a simple T-SQL code block. This sql file should be executable by itself and should not contain any `use` or `go` commands.
Submit the T-SQL code in file `f3.sql`. Do not use a stored procedure in this exercise; create a simple T-SQL code block. This sql file should be executable by itself and should not contain any `use` or `go` commands.

Create a screenshot that displays the content of the `Product` table after running the script. The new column and the populated values should be visible on the screenshot. Make sure that the database name and your Neptun code are visible on the screenshot. Save the screenshot as `f2.png` and upload it as part of your submission!
Create a screenshot that displays the content of the `Product` table after running the script. The new column and the populated values should be visible on the screenshot. Make sure that the database name and your Neptun code are visible on the screenshot. Save the screenshot as `f3.png` and upload it as part of your submission!
4 changes: 2 additions & 2 deletions docs/en/homework/rest/index.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Task: REST API with Web API Technology
# Task: REST API with Web API Technology

You may earn **4 points** by completing this exercise.

Create a repository using GitHub Classroom. You can find the **invitation URL in Moodle**. Clone the repository after it's been created. This will contain the expected structure of the solution. After completing the tasks, commit and push your solution.
Use GitHub Classroom to get your git repository. You can find the **invitation link in Moodle**. Clone the repository created via the link. It contains a skeleton and the expected structure of your submission. After completing the exercises and verifying them, commit and push your submission.

The required software and tools for the solution can be found [here](../index.md#required-tools).

Expand Down
2 changes: 1 addition & 1 deletion docs/en/lecture-notes/mssql/sql.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ where Price=(select max(Price) from Product)
What was the min, max and average selling price of each product with name containing _Lego_ having an average selling price more than 10000

```sql
select p.Id, p.Name, min(oi.Price), max(oi.Price), avg(oi.Price)
select p.Id, p.Name, min(oi.Price), max(oi.Price), sum(oi.Price*oi.Amount)/sum(oi.Amount)
from Product p
inner join OrderItem oi on p.ID=oi.ProductID
Where p.Name like '%Lego%'
Expand Down
10 changes: 5 additions & 5 deletions docs/en/seminar/jpa/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ The exercises are solved together with the instructor. A few exercises we can tr

## Exercise 1: Start the IDE

1. Start Spring Tool Suite from here: `c:\Work\hatteralkalmazasok\sts-4.5.1.RELEASE\SpringToolSuite4.exe`.
1. It will ask for a workspace, select: `c:\Work\hatteralkalmazasok\workspaces\adatvez`
1. Start Spring Tool Suite from here: `c:\Tools\hatteralkalmazasok\eclipse\SpringToolSuite4.exe`.
1. It will ask for a workspace, select: `c:\Tools\hatteralkalmazasok\workspaces\adatvez`
1. If there is a **webshop** project in the Project Explorer already, delete it: right-click the project / _Delete_, and check _Delete project contents on disk_

## Exercise 2: Import project
Expand Down Expand Up @@ -102,7 +102,7 @@ The running application can be stopped with the red _Terminate_ icon in the Cons

If we close the _Console_ view by mistake, use shortcut _Alt+Shift+Q, C_ or menu _Window / Show View / Console_ to reopen.

After shutdown, we can re-run using F11.
We can re-run the application using F11 as well. The workspace is configured to automatically terminate the running instance first in this case, so pressing the Terminate button manually is not needed.

When running the application in debug mode, the modifications in HTML files and some Java ode modifications are immediately actualized, so we only have to refresh the browser to see the effect of the code modification. But the application has to be restarted if we modify the Java code in either of the following ways

Expand Down Expand Up @@ -177,8 +177,8 @@ Simply put, when modifying code that is not inside of an existing method, a rest

import java.util.List;

import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import jakarta.persistence.EntityManager;
import jakarta.persistence.PersistenceContext;

public class ProductRepositoryImpl implements ProductRepositoryCustom {

Expand Down
2 changes: 1 addition & 1 deletion docs/hu/gyakorlatvezetoknek/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ A gyakorlat kiadott segédlet alapján kerül megtartásra. A gyakorlatvezető f

**Számonkérések lebonyolításában segítség.** A tárgyban ZH, PZH, és 4 vizsga van. Mindegyik számonkérés írásban történik. A gyakorlatvezető feladata a számonkérések felügyelése majd a javításban történő részvétel. A felügyelés ideje alkalmanként körülbelül 1 óra, a javítás ideje létszám függően 0.5-2 óra alkalmanként. Gyakorlatvezetőként körülbelül a számonkérések felében kell részt venni.

**Házi feladatok értékelése.** A félév során 5 opcionális kis házi feladatot hirdetünk meg. Ezeket a hallgatók otthon, önállóan oldják meg és adják be GitHub pull request-ek formájában. A házi feladatok kiértékelése részben automatikusan történik: egy szoftver lefuttatja és ellenőrzi a beadott munkát. A gyakorlatvezető feladata a beadott házi feladat formai ellenőrzése: kért képernyőképek megfelelnek-e az előírásoknak és konzisztensek-e a beadott forráskóddal. A házi feladat nem kötelező, nem minden hallgató szokta elkészíteni, így házi feladatonként körülbelül 1 óra idő ráfordítást jelent.
**Házi feladatok értékelése.** A félév során 5 kis házi feladatot hirdetünk meg. Ezeket a hallgatók otthon, önállóan oldják meg és adják be GitHub pull request-ek formájában. A házi feladatok kiértékelése részben automatikusan történik: egy szoftver lefuttatja és ellenőrzi a beadott munkát. A gyakorlatvezető feladata a beadott házi feladat formai ellenőrzése: kért képernyőképek megfelelnek-e az előírásoknak és konzisztensek-e a beadott forráskóddal. A házi feladat nem kötelező, nem minden hallgató szokta elkészíteni, így házi feladatonként körülbelül 1 óra idő ráfordítást jelent.

## Demonstrátorság

Expand Down
3 changes: 3 additions & 0 deletions docs/hu/homework/adonet/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Feladat: ADO.NET adatelérés

!!! important "2024-től kifutott"
FIGYELEM: Ez a feladat 2024-től már nem aktív.

A házi feladat opcionális. A teljesítéssel **2 pluszpont és 2 iMsc pont** szerezhető.

GitHub Classroom segítségével hozz létre magadnak egy repository-t. A **meghívó URL-t Moodle-ben találod**. Klónozd le az így elkészült repository-t. Ez tartalmazni fogja a megoldás elvárt szerkezetét. A feladatok elkészítése után kommitold és pushold a megoldásod.
Expand Down
4 changes: 2 additions & 2 deletions docs/hu/homework/ef/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Feladat: Entity Framework

A házi feladat teljesítésével **4 pont és 2 iMsc pont** szerezhető.
A házi feladat teljesítésével **4 pont és 3 iMsc pont** szerezhető.

GitHub Classroom segítségével hozz létre magadnak egy repository-t. A **meghívó URL-t Moodle-ben találod**. Klónozd le az így elkészült repository-t. Ez tartalmazni fogja a megoldás elvárt szerkezetét. A feladatok elkészítése után kommitold és pushold a megoldásod.

Expand Down Expand Up @@ -88,7 +88,7 @@ Implementáld a `ProductRepository` osztály függvényeit.
!!! example "BEADANDÓ"
A módosított C# forráskódot töltsd fel.

## Feladat 3: Logikai törlés Entity Framework-kel (2 iMSc pont)
## Feladat 3: Logikai törlés Entity Framework-kel (3 iMSc pont)

!!! note ""
A pont megszerzésére az első két feladat megoldásával együtt van lehetőség.
Expand Down
11 changes: 6 additions & 5 deletions docs/hu/homework/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Szorgalmi házi feladatok
# Kis házi feladatok

A házi feladatok **opcionálisak, pluszpont és iMsc pont** szerezhető velük. A feladatok leírása található itt; a megoldások beadása GitHub Classroom segítségével történik.
A házi feladatok **kötelezőek (lásd követelméynek), vizsgapont és iMsc pont** szerezhető velük. A feladatok leírása található itt; a megoldások beadása GitHub Classroom segítségével történik.

!!! important "Működő kód"
A feladatok során működő kódot, kódrészleteteket kell készíteni. A feladat lényege a valóságban működő és a kívánt funkciót ellátó kód készítése.
Expand All @@ -11,6 +11,7 @@ A házi feladatok **opcionálisak, pluszpont és iMsc pont** szerezhető velük.
1. [Entity Framework](ef/index.md)
1. [MongoDB](mongodb/index.md)
1. [REST API Web API technológiával](rest/index.md)
1. GraphQL

## A feladatok beadása

Expand Down Expand Up @@ -44,10 +45,10 @@ A feladatok kérik, hogy készíts képernyőképet a megoldás egy-egy részér
- REST API feladatokhoz: [Postman](https://www.getpostman.com/)
- Az első házi kivételével a C# programozós feladatokhoz:
- Microsoft Visual Studio 2022 [az itt található beállításokkal](VisualStudio.md). Linux és MacOS esetén Visual Studio Code és a .NET SDK-val települő [dotnet CLI](https://docs.microsoft.com/en-us/dotnet/tools/) használható.
- [.NET **6.0** SDK](https://dotnet.microsoft.com/download/dotnet/6.0)
- [.NET **8.0** SDK](https://dotnet.microsoft.com/download/dotnet/8.0)

!!! warning ".NET 6.0"
A feladat megoldásához **6.0** .NET SDK telepítése szükséges.
!!! warning ".NET 8.0"
A feladat megoldásához **8.0** .NET SDK telepítése szükséges.

Windows-on Visual Studio verzió függvényében lehet, hogy telepítve van (lásd [itt](VisualStudio.md#net-sdk-ellenorzese-es-telepitese) az ellenőrzés módját); ha nem, akkor a fenti linkről kell telepíteni (az SDK-t és _nem_ a runtime-ot.) Linux és MacOS esetén telepíteni szükséges.

Expand Down
Loading

0 comments on commit 75342de

Please sign in to comment.