This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Course | |
{ | |
// Non static members describe the state of an | |
// *instance* of an object | |
public string Name { get; set; } | |
public int CreditHours { get; set; } | |
public string Instructor { get; set; } | |
public Course() { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class Course | |
{ | |
// Static properties can be accessed on the class | |
// but not the object | |
public static string Name { get; set; } | |
public static int CreditHours { get; set; } | |
public static string Instructor { get; set; } | |
static Course() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Course | |
{ | |
public static int TAToStudentMax { get; set; } = 10; | |
public string Name { get; set; } | |
public int CreditHours { get; set; } | |
public int CostPerHour { get; set; } | |
public int StudentsInClass { get; set; } | |
public static int GetMinimumTAsNeeded(int numberStudents) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="toolbar-container"> | |
<mat-toolbar class="toolbar" color="primary"> | |
<mat-icon aria-hidden="false" aria-label="check mark icon">fact_check</mat-icon> | |
<h1>Habit Tracker</h1> | |
</mat-toolbar> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//... other imports... | |
import { MatIconModule } from '@angular/material/icon'; | |
import { MatToolbarModule } from '@angular/material/toolbar'; | |
@NgModule({ | |
declarations: [ | |
AppComponent | |
], | |
imports: [ | |
//...other imports... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component } from '@angular/core'; | |
import { Habit } from './models/habit'; | |
@Component({ | |
selector: 'app-root', | |
templateUrl: './app.component.html', | |
styleUrls: ['./app.component.scss'], | |
}) | |
export class AppComponent { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="all-habits"> | |
<h1>All Habits</h1> | |
<div *ngFor="let habit of habits"> | |
<mat-card> | |
<mat-card-title> | |
<mat-icon | |
class="habit-icon" | |
color="accent" | |
aria-hidden="false" | |
aria-label="circle check mark icon" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="add-form-container"> | |
<mat-card> | |
<mat-card-title>Add New Habit </mat-card-title> | |
<hr /> | |
<form> | |
<mat-card-content> | |
<mat-form-field appearance="fill"> | |
<mat-label>Title</mat-label> | |
<input matInput /> | |
</mat-form-field> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//...other imports... | |
import { MatCardModule } from '@angular/material/card'; | |
import { MatIconModule } from '@angular/material/icon'; | |
import { MatToolbarModule } from '@angular/material/toolbar'; | |
@NgModule({ | |
declarations: [AppComponent], | |
imports: [ | |
//...other imports... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//...other imports | |
import { MatButtonModule } from '@angular/material/button'; | |
import { MatCardModule } from '@angular/material/card'; | |
import { MatIconModule } from '@angular/material/icon'; | |
import { MatInputModule } from '@angular/material/input'; | |
import { MatSelectModule } from '@angular/material/select'; | |
import { MatToolbarModule } from '@angular/material/toolbar'; | |
@NgModule({ |
OlderNewer