Complete the code to declare a simple class named Car.
public [1] Car { // class body }
The keyword class is used to declare a class in C#.
Complete the code to declare a public class named Person.
[1] class Person { // properties and methods }
The keyword public makes the class accessible from other parts of the program.
Fix the error in the class declaration to make it valid.
public class [1] { // class body }
Class names must start with a letter and cannot contain spaces or hyphens. Car123 is valid.
Fill both blanks to declare a sealed class named Logger.
[1] sealed [2] Logger { // class body }
The correct syntax is public sealed class Logger. public is the access modifier and class declares the type.
Fill all three blanks to declare an abstract class named Shape with public access.
[1] [2] [3] Shape { // class body }
The correct declaration is public abstract class Shape. public is the access modifier, abstract means the class cannot be instantiated, and class declares the type.