
Quiz z Programowania w C#
Authored by Ochotnik L
Computers
12th Grade
Used 2+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Rozważ następujący fragment kodu: public class Samochod { public string Marka; private int RokProdukcji; public Samochod(string marka, int rokProdukcji) { Marka = marka; RokProdukcji = rokProdukcji; } } Który z poniższych kodów poprawnie tworzy obiekt klasy Samochod?
Samochod auto = new Samochod("Toyota");
Samochod auto = Samochod("Toyota", 2015);
Samochod auto = new Samochod("Toyota", 2015);
Samochod auto = new Samochod;
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Które słowo kluczowe w C# pozwala, aby klasa Pojazd była używana jako klasa bazowa, ale jednocześnie nie pozwala tworzyć jej instancji? public ____ class Pojazd { public void UruchomSilnik() { } }
virtual
static
abstract
sealed
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Przyjrzyj się poniższemu przykładowi dziedziczenia: public class Pojazd { public int LiczbaKol = 4; } public class Samochod : Pojazd { public string Marka = "Ford"; } Który z poniższych kodów poprawnie odwołuje się do pola LiczbaKol?
Pojazd pojazd = new Pojazd(); Console.WriteLine(pojazd.LiczbaKol);
Samochod auto = new Samochod(); Console.WriteLine(auto.LiczbaKol);
Pojazd auto = new Samochod(); Console.WriteLine(auto.Marka);
Samochod auto = new Pojazd(); Console.WriteLine(auto.LiczbaKol);
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Co zostanie wyświetlone w poniższym kodzie? public class Zwierze { public virtual void WydajDzwiek() { Console.WriteLine("Dźwięk zwierzęcia"); } } public class Pies : Zwierze { public override void WydajDzwiek() { Console.WriteLine("Hau hau"); } } Zwierze zwierze = new Pies(); zwierze.WydajDzwiek();
Dźwięk zwierzęcia
Hau hau
Błąd kompilacji
Dźwięk zwierzęcia Hau hau
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Który z poniższych modyfikatorów dostępu pozwala na dostęp do pola klasy tylko w tej samej klasie oraz w klasach pochodnych?
private
public
protected
internal
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Który z modyfikatorów dostępu pozwala na dostęp do pola klasy tylko w tej samej klasie oraz w klasach pochodnych?
private
public
protected
internal
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Przyjrzyj się poniższemu fragmentowi kodu:
public class Osoba
{
public string Imie { get; set; }
public virtual void PrzedstawSie()
{
Console.WriteLine($"Cześć, jestem {Imie}");
}
}
public class Pracownik : Osoba
{
public override void PrzedstawSie()
{
Console.WriteLine($"Cześć, jestem pracownikiem o imieniu {Imie}");
}
}
Co zostanie wyświetlone po wykonaniu poniższego kodu?
Osoba osoba = new Pracownik { Imie = "Jan" }; osoba.PrzedstawSie();
Cześć, jestem Jan
Cześć, jestem pracownikiem o imieniu Jan
Cześć, jestem
Błąd kompilacji
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
10 questions
Loops - code.org
Quiz
•
12th Grade
14 questions
SMR-RL-UT7 - Enrutamiento (nivel III)
Quiz
•
12th Grade
14 questions
AWS Cloud
Quiz
•
11th - 12th Grade
15 questions
Unity Interface Basics 101
Quiz
•
9th - 12th Grade
15 questions
Chapter : 9 Working with tables
Quiz
•
5th Grade - University
15 questions
Code.org Unit 5 Lesson 15 Assessment
Quiz
•
9th - 12th Grade
15 questions
Roblox Studio concept review
Quiz
•
1st - 12th Grade
10 questions
Database Scenarios Review
Quiz
•
12th Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
29 questions
Alg. 1 Section 5.1 Coordinate Plane
Quiz
•
9th Grade
22 questions
fractions
Quiz
•
3rd Grade
11 questions
FOREST Effective communication
Lesson
•
KG
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
Discover more resources for Computers
20 questions
-AR -ER -IR present tense
Quiz
•
10th - 12th Grade
22 questions
El Imperfecto
Quiz
•
9th - 12th Grade
20 questions
SSS/SAS
Quiz
•
9th - 12th Grade
20 questions
verbos reflexivos en español
Quiz
•
9th - 12th Grade
14 questions
Making Inferences From Samples
Quiz
•
7th - 12th Grade
23 questions
CCG - CH8 Polygon angles and area Review
Quiz
•
9th - 12th Grade
8 questions
Momentum and Collisions
Lesson
•
9th - 12th Grade
28 questions
Ser vs estar
Quiz
•
9th - 12th Grade