Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1 . Create a class called student with properties name, major, gpa, and classesTaken ( an array of course ids taken, i . e .
Create a class called student with properties name, major, gpa, and classesTaken an array of course ids taken, ie IT IT IT
Include a constructor that accepts and assigns values for all of the properties.
Add a method to the class called displayProperties In displayProperties, output all of the property values in the class using document.writeln
Create an object with type Student. Using the constructor method, assign values to the properties: name"Your name", major"Your major", gpa classes takenITITIT
Create an object do not create a class for this one called Course. Important: you should not create a course class. Include the following:
Properties and values: courseIdIT titleIT crsDesc"Interactive Internet Programming", creditHrs
Add a method to the object called displayCourse Use the object properties, a loop, or Object.values along with document.writeln to display all of the properties for your course object on the page.
Create an object called planet. Add properties nameMercury and diameterMiles
On a separate line of code after the object is created, add a property called millMilesFromEarth and assign a value of
Output each property value using a document.writeln and directly accessing the property. For example: document.writelnPlanet Name: planet.name;
Create a set called favoriteLanguages. Add the following values to it: "JavaScript", "Python", "Swift", "Dart".
Use the following code to output all of the values in favoriteLanguages:
forlet language of favoriteLanguages
console.loglanguage;
Create a map called creditHrs. Use the map to store course numbers and the corresponding credit hours for each of the following courses: IT: IT: IT: IT: IT: IT: IT:
Use a get to find the credit hours for IT
Use a loop to output all of the values.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started