Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In this activity you will create a web page with a Javascript-enabled decision-support system (DSS) to select a car. The is a problem-based learning activity

In this activity you will create a web page with a Javascript-enabled decision-support system (DSS) to select a car.

The is a problem-based learning activity designed to expose you early to some central Javascript programming concepts.

Here are the steps:

  1. Create a standard IST 256 directory called carsdss with the standard three sub-directories: images, styles, and scripts.
  2. At the root level of carsdss create an html file called carsdss.html
  3. In carsdss.html create a link to a file in the scripts directory called scripts.js
  4. Create the file scripts.js in the scripts subdirectory
  5. In the body of carsdss.html create level 1 heading with the text: Car Selector
  6. In the body of carsdss.html create three level 3 headings with the IDs: car1, car2, and car3, and the text: Car 1, Car 2, and Car 3 respectively.
  7. Test your html file
  8. Add the code: alert("JS loaded"); to the top of your scripts file, then test your html again to ensure the JS link is working
  9. If your link is working comment out the line you just added above
  10. In scripts.js create three object variables called car1, car2, and car3.
  11. Each of these objects should have four attributes: model (string), price, performance, and reliability (all numbers).
  12. Set the model values to your three favorite cars and set the price, performance, and reliability values to a number between 1 and 10.
  13. To each of the objects above add a getScore function that returns the sum of price, performance, and reliability.
  14. Now, set the text of the three level 3 headings to a string consisting of the model and score of each of the cars from your objects.
    1. For example, the heading 3 with the ID car1 gets the model and score from the JS object variable car1
    2. So a heading 3 value should look like this: Porche 911 - Score: 22 (include the hyphen, and the "Score:" string your text.
  15. Once your DSS is working zip the entire cardss project directory and submit to Canvas.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Conceptual Database Design An Entity Relationship Approach

Authors: Carol Batini, Stefano Ceri, Shamkant B. Navathe

1st Edition

0805302441, 978-0805302448

More Books

Students also viewed these Databases questions

Question

4. Design a career management system.

Answered: 1 week ago

Question

Describe Table Structures in RDMSs.

Answered: 1 week ago