College

We appreciate your visit to Project Instructions Overview This project will allow you to practice the material from the first 3 modules Please read through the instructions completely before starting. This page offers clear insights and highlights the essential aspects of the topic. Our goal is to provide a helpful and engaging learning experience. Explore the content and find the answers you need!

# Project Instructions

## Overview
This project will allow you to practice the material from the first 3 modules. Please read through the instructions completely before starting to understand what is being asked.

## Steps

1. **Choose an Industry/Category**
- Choose an industry or category that you like. It can be anything: electronics, furniture, apple products, etc.
- Do not use the same products as a friend. The selection must be unique.

2. **Create an Array of Objects**
- Select some products from the industry/category and create an array of objects. For example, in electronics, you could select TVs, computers, printers, etc.
- The array must contain at least 10 objects.
- Select your data from related websites (stores, factories, etc.).
- Each object will have at least 4 properties with values.
- Each object in the array should have the same set of property names with different values.
- At least one string value and 2 number values.
- Other properties can be of any JavaScript value type.

3. **Create a Function**
- The function should:
- Make a calculation (e.g., total inventory cost or cost of products sold for each product/object).
- Format your object in a nice string format for output.
- This function should be a pure function that takes one object as an argument and returns a string.
- The string can be formatted in any way that you feel is appropriate for your data, including the calculated cost.
- It must use one or more properties from the object in the output string.

4. **Create a New Array**
- Create a new array from your original array that only contains string values produced by the function above.
- Sort this array alphabetically and display an appropriate heading followed by this list, one string per line.

5. **Prompt the User**
- Prompt the user for a numeric value.
- Display a string (formatted using the function above) for each object that has a property greater or less (your choice) than the value provided by the user.
- Provide a message if no objects match.

6. **Calculate the Average**
- Calculate the average value of the calculation for all your objects/products.
- Output it with descriptive text in a nicely formatted way.

## Additional Requirements
- Use template literals (back-tick strings) where appropriate rather than concatenation.
- Do not use loops; use higher-order methods. If you do, include a comment with your reason.
- Do not use `var` or `document.write()`.
- Do not use movie titles for your data.

## Submission
- Submit your completed JavaScript file on Blackboard.
- Do not zip or otherwise compress your file. Submit only the `.js` file.
- Include meaningful comments throughout the code.

## Example of Output
- Sample object from array:
```javascript
{
productName: 'Laptop',
inventory: 12,
unitPrice: 650,
brand: ['HP', 'Acer'],
unitsSold: 34
}
```
- Sample return value from function taking the above object as an argument (Note that the parentheses are just for display, they are not required):
```plaintext
"(12) Laptop with total inventory cost of $18650"
```
- Sample Output:
```plaintext
Electronics:
"(39) Computer with total inventory cost of $564567"
"(12) Laptop with total inventory cost of $18650"
"(2) Printer with total inventory cost of $5678"
```
- Electronics need to be ordered (less than 5):
```plaintext
"(2) Printer with total inventory cost of $5678"
"(4) Projector with total inventory cost of $3421"
```
- The average of inventory sold for products is: 23456.

Answer :

For this project, you need to complete the following tasks:

1. Select some products of the industry/category and create an array of objects with at least 10 objects. Each object will have at least 4 properties with values. Each object of the array should have the same set of property names with different values. The array must contain at least 10 objects. Select your data from related web sites (stores, factories, etc.)

2. Create a function that can make a calculation and the output can be used to format your object in a nice string format for output. This function should be a pure function that takes one object as an argument and returns a string.

3. Create a new array from your array that only contains string values produced by the above function. Sort this array alphabetically and display an appropriate heading followed by this list one string in line.

4. Prompt the user for a numeric value. Display a string (formatted using the function above) for each of the objects that have a property that is greater or less (up to you) than the value provided by the user.

5. Calculate the average value of the calculation that you calculated of all your objects/products. Output it with descriptive text in a nicely formatted way.

Follow the below instructions:

Step 1: Select some products of the industry/category and create an array of objects:

You can select any industry or category, such as electronics, furniture, Apple products, or anything you use or live in. For example, if you select electronics, you could select TV, computers, printers, etc. For furniture, you could select beds, chair, couch, and so on.

Each object in the array must have at least 4 properties with values. The properties can be of any JavaScript value type. However, each object of the array should have the same set of property names with different values. At least one string value and 2 number value is necessary. You can select your data from related web sites (stores, factories, etc.).

There must be at least 10 objects in the array.

Step 2: Create a function that can make a calculation:

Create a function that can make a calculation and the output can be used to format your object in a nice string format for output. This function should be a pure function that takes one object as an argument and returns a string. You can select any calculation that matches your data. For example, one of the total inventory cost or cost of products sold of each product/object.

This function should take one object as an argument and return a string. The string can be formatted in any way that you feel is appropriate for your data, including the cost that you calculated. It must use one or more properties from the object in the output string.

Step 3: Create a new array from your array that only contains string values:

Create a new array from your array that only contains string values produced by the above function. Sort this array alphabetically and display an appropriate heading followed by this list, one string in line.

Step 4: Prompt the user for a numeric value

:Prompt the user for a numeric value. Display a string (formatted using the function above) for each of the objects that have a property that is greater or less (up to you) than the value provided by the user. Be sure to provide a message if there are no objects that match.

Step 5: Calculate the average value of the calculation:

Calculate the average value of the calculation that you calculated of all your objects/products. Output it with descriptive text in a nicely formatted way. Use template literals (back-tick strings) where appropriate rather than concatenation. Do not use loops, use higher-order methods. If you do, include a comment with your reason.

Do not use var or document.write()

.Do not use movie titles for your data.

To know more about project, visit:

https://brainly.com/question/30329737

#SPJ11

Thanks for taking the time to read Project Instructions Overview This project will allow you to practice the material from the first 3 modules Please read through the instructions completely before starting. We hope the insights shared have been valuable and enhanced your understanding of the topic. Don�t hesitate to browse our website for more informative and engaging content!

Rewritten by : Barada