Question: TypeScript syntax: 1) Define a Typescript class for representing students with three attributes: firstname, lastname, admissionYear; 2) Create an array called studentList, store 5 students

TypeScript syntax:

  1. 1) Define a Typescript class for representing students with three attributes: firstname, lastname, admissionYear;

  2. 2) Create an array called studentList, store 5 students object to studentList array using push function. You can pick any values for the sample student names or admission years (ranging from 2014 to 2019)

  3. 3) Use a for loop to print out the number of years to graduate for students in the year. Your output should look like below: John Howard will graduate in 3 years Mary Lee will graduate in 2 years

    ...

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!