Skip to content

Commit 90ca3c4

Browse files
authored
Merge pull request #49059 from wwlpublish/4fcdf75661be148fc61aef72edc9a7a4982f969ec0a0e5f7195adfc8d2e6a684-live
Modules/M03-manage-class-implementations
2 parents 79866dd + e88f4a9 commit 90ca3c4

22 files changed

+2006
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
### YamlMime:ModuleUnit
2+
uid: learn.wwl.manage-class-implementations.introduction
3+
title: Introduction
4+
metadata:
5+
title: Introduction
6+
description: "Introduction"
7+
ms.date: 02/10/2025
8+
author: wwlpublish
9+
ms.author: cahowd
10+
ms.topic: unit
11+
durationInMinutes: 2
12+
content: |
13+
[!include[](includes/1-introduction.md)]
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
### YamlMime:ModuleUnit
2+
uid: learn.wwl.manage-class-implementations.summary
3+
title: Summary
4+
metadata:
5+
title: Summary
6+
description: "Summary"
7+
ms.date: 02/10/2025
8+
author: wwlpublish
9+
ms.author: cahowd
10+
ms.topic: unit
11+
durationInMinutes: 2
12+
content: |
13+
[!include[](includes/10-summary.md)]
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
### YamlMime:ModuleUnit
2+
uid: learn.wwl.manage-class-implementations.examine-structure-object-oriented-programs
3+
title: Examine the structure of object-oriented programs
4+
metadata:
5+
title: Examine the structure of object-oriented programs
6+
description: "Examine the structure of object-oriented programs"
7+
ms.date: 02/10/2025
8+
author: wwlpublish
9+
ms.author: cahowd
10+
ms.topic: unit
11+
durationInMinutes: 11
12+
content: |
13+
[!include[](includes/2-examine-structure-object-oriented-programs.md)]
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
### YamlMime:ModuleUnit
2+
uid: learn.wwl.manage-class-implementations.implement-private-static-nested-classes
3+
title: Implement private, static, and nested classes
4+
metadata:
5+
title: Implement private, static, and nested classes
6+
description: "Implement private, static, and nested classes"
7+
ms.date: 02/10/2025
8+
author: wwlpublish
9+
ms.author: cahowd
10+
ms.topic: unit
11+
durationInMinutes: 14
12+
content: |
13+
[!include[](includes/3-implement-private-static-nested-classes.md)]
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
### YamlMime:ModuleUnit
2+
uid: learn.wwl.manage-class-implementations.implement-partial-classes
3+
title: Implement classes using partial classes
4+
metadata:
5+
title: Implement classes using partial classes
6+
description: "Implement classes using partial classes"
7+
ms.date: 02/10/2025
8+
author: wwlpublish
9+
ms.author: cahowd
10+
ms.topic: unit
11+
durationInMinutes: 11
12+
content: |
13+
[!include[](includes/4-implement-partial-classes.md)]
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
### YamlMime:ModuleUnit
2+
uid: learn.wwl.manage-class-implementations.specify-named-optional-method-arguments
3+
title: Specify named and optional method arguments
4+
metadata:
5+
title: Specify named and optional method arguments
6+
description: "Specify named and optional method arguments"
7+
ms.date: 02/10/2025
8+
author: wwlpublish
9+
ms.author: cahowd
10+
ms.topic: unit
11+
durationInMinutes: 9
12+
content: |
13+
[!include[](includes/5-specify-named-optional-method-arguments.md)]
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
### YamlMime:ModuleUnit
2+
uid: learn.wwl.manage-class-implementations.instantiate-objects-initializers-copy-constructor
3+
title: Instantiate objects using initializers and copy constructors
4+
metadata:
5+
title: Instantiate objects using initializers and copy constructors
6+
description: "Instantiate objects using initializers and copy constructors"
7+
ms.date: 02/10/2025
8+
author: wwlpublish
9+
ms.author: cahowd
10+
ms.topic: unit
11+
durationInMinutes: 13
12+
content: |
13+
[!include[](includes/6-instantiate-objects-initializers-copy-constructor.md)]
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
### YamlMime:ModuleUnit
2+
uid: learn.wwl.manage-class-implementations.examine-class-finalizers
3+
title: Examine class finalizers
4+
metadata:
5+
title: Examine class finalizers
6+
description: "Examine class finalizers"
7+
ms.date: 02/10/2025
8+
author: wwlpublish
9+
ms.author: cahowd
10+
ms.topic: unit
11+
durationInMinutes: 7
12+
content: |
13+
[!include[](includes/7-examine-class-finalizers.md)]
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
### YamlMime:ModuleUnit
2+
uid: learn.wwl.manage-class-implementations.exercise-update-class-structures
3+
title: Exercise - Manage class implementations in C# applications
4+
metadata:
5+
title: Exercise - Manage class implementations in C# applications
6+
description: "Exercise - Manage class implementations in C# applications"
7+
ms.date: 02/10/2025
8+
author: wwlpublish
9+
ms.author: cahowd
10+
ms.topic: unit
11+
durationInMinutes: 30
12+
content: |
13+
[!include[](includes/8-exercise-update-class-structures.md)]
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
### YamlMime:ModuleUnit
2+
uid: learn.wwl.manage-class-implementations.knowledge-check
3+
title: Knowledge check
4+
metadata:
5+
title: Knowledge check
6+
description: "Knowledge check"
7+
ms.date: 02/10/2025
8+
author: wwlpublish
9+
ms.author: cahowd
10+
ms.topic: unit
11+
durationInMinutes: 7
12+
quiz:
13+
title: "Check your knowledge"
14+
questions:
15+
- content: "What is the main difference between structured programming and object-oriented programming?"
16+
choices:
17+
- content: "Structured programming and object-oriented programming are essentially the same, with only minor differences in syntax and terminology."
18+
isCorrect: false
19+
explanation: "Incorrect. Structured programming and object-oriented programming are two distinct approaches to software development, each with its own set of principles and methodologies."
20+
- content: "Structured programming focuses on the sequence of actions to be performed, while object-oriented programming emphasizes the objects involved in the actions."
21+
isCorrect: true
22+
explanation: "Correct. While structured programming focuses on the sequence of actions to be performed, object-oriented programming emphasizes the objects involved in the actions."
23+
- content: "Structured programming is based on objects that encapsulate both data and behavior, while object-oriented programming is based on a top-down approach where the program is divided into smaller, manageable functions or procedures."
24+
isCorrect: false
25+
explanation: "Incorrect. This statement is reversed. Object-oriented programming is based on objects that encapsulate both data and behavior, while structured programming is based on a top-down approach where the program is divided into smaller, manageable functions or procedures."
26+
- content: "What is the main difference between a static class and a non-static class?"
27+
choices:
28+
- content: "A static class can't be instantiated and it contains only static members."
29+
isCorrect: true
30+
explanation: "Correct. A static class is essentially a non-static class that can't be instantiated and only contains static members."
31+
- content: "A static class can't contain static methods, fields, properties, or events."
32+
isCorrect: false
33+
explanation: "Incorrect. A static class can only contain static members."
34+
- content: "A static class can be instantiated using the 'new' operator."
35+
isCorrect: false
36+
explanation: "Incorrect. A static class can't be instantiated using the 'new' operator."
37+
- content: "What is the purpose of using the partial keyword in class definitions?"
38+
choices:
39+
- content: "It allows a class to inherit from multiple base classes."
40+
isCorrect: false
41+
explanation: "Incorrect. In C#, a class can't inherit from multiple base classes. The partial keyword is used to split a class definition across multiple files."
42+
- content: "It enables the splitting of a class definition over two or more source files."
43+
isCorrect: true
44+
explanation: "Correct. The partial keyword allows a class definition to be split across multiple files. All parts are combined when the application is compiled."
45+
- content: "It makes a class abstract, meaning it can't be instantiated directly."
46+
isCorrect: false
47+
explanation: "Incorrect. The partial keyword does not make a class abstract. It's used to split a class definition across multiple files."
48+
- content: "What happens when named and optional arguments are used in a method?"
49+
choices:
50+
- content: "The arguments are evaluated in the order in which they appear in the parameter list, not the argument list."
51+
isCorrect: false
52+
explanation: "Incorrect. When named and optional arguments are used, the arguments are evaluated in the order in which they appear in the argument list, not the parameter list."
53+
- content: "The arguments are evaluated in the order in which they appear in the argument list, not the parameter list, and they allow supplying arguments for selected parameters."
54+
isCorrect: true
55+
explanation: "Correct. Named and optional arguments are evaluated in the order they appear in the argument list and they allow supplying arguments for selected parameters."
56+
- content: "Named and optional parameters do not allow supplying arguments for selected parameters."
57+
isCorrect: false
58+
explanation: "Incorrect. Named and optional parameters enable you to supply arguments for selected parameters."
59+
- content: "What is the purpose of a copy constructor in C#?"
60+
choices:
61+
- content: "It allows you to create a new object by copying the values of an existing object's methods."
62+
isCorrect: false
63+
explanation: "Incorrect. A copy constructor does not copy the methods of an existing object, it copies the values of an existing object's properties."
64+
- content: "It allows you to create a new object by copying the values of an existing object's properties."
65+
isCorrect: true
66+
explanation: "Correct. A copy constructor in C# creates a new object by copying the values of an existing object's properties."
67+
- content: "It allows you to assign values to any accessible fields or properties of an object at creation time without having to invoke a constructor followed by lines of assignment statements."
68+
isCorrect: false
69+
explanation: "Incorrect. This is the definition of an object initializer, not a copy constructor."
70+
- content: "What is the role of a finalizer in a class in C#?"
71+
choices:
72+
- content: "Finalizers are used to allocate memory for a class instance."
73+
isCorrect: false
74+
explanation: "Incorrect. Finalizers aren't used for memory allocation, but for clean-up when a class instance is being collected by the garbage collector."
75+
- content: "Finalizers are used to perform any necessary final clean-up when a class instance is being collected by the garbage collector."
76+
isCorrect: true
77+
explanation: "Correct. Finalizers are used to release any unmanaged resources and perform clean-up before an object is garbage collected."
78+
- content: "Finalizers can be called explicitly to perform specific actions."
79+
isCorrect: false
80+
explanation: "Incorrect. Finalizers can't be called explicitly. They're invoked automatically by the garbage collector."
81+
- content: "What is the primary purpose of implementing classes in C# applications?"
82+
choices:
83+
- content: "To increase the execution speed of the application"
84+
isCorrect: false
85+
explanation: "Incorrect. While efficient code can improve execution speed, the primary purpose of classes is to encapsulate data and behavior."
86+
- content: "To create a visual representation of the application"
87+
isCorrect: false
88+
explanation: "Incorrect. Classes aren't used for visual representation, they're used to define objects and their behavior."
89+
- content: "To encapsulate data and behavior into objects"
90+
isCorrect: true
91+
explanation: "Correct. Classes in C# are used to encapsulate data and behavior into objects, providing a blueprint for creating instances or objects."

0 commit comments

Comments
 (0)