
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
JavaScript
NOTE: Dataset is defined below.
Using the data set as a pre-defined variable in your program, write code that uses the dataset to print the FIRST NAMES ONLY of people who have BOTH above average English grades AND below average age from the dataset.
The solutions for the textbook examples assume you are able to export in a framework like node.js, which is why in the data set I provide, I simply set the array of objects as a variable. Your code will be in the same file (treat it like any other array variable). You can do the same with the sample files the chapter provides. For example:
var ancestry = [
{
.. object ..
},
...
]
// your code here
Requirements:
- Cannot use any array type built-in functions except filter(), map(), and reduce().
var dataSet = [
{
"name":"Maura Glass",
"age":60,
"math":97,
"english":63,
"yearsOfEducation":4
},
{
"name":"James Gates",
"age":55,
"math":72,
"english":96,
"yearsOfEducation":10
},
{
"name":"Mills Morris",
"age":26,
"math":83,
"english":77,
"yearsOfEducation":10
},
{
"name":"Deena Morton",
"age":57,
"math":63,
"english":63,
"yearsOfEducation":10
},
{
"name":"Edith Roth",
"age":38,
"math":79,
"english":94,
"yearsOfEducation":10
},
{
"name":"Marva Morse",
"age":31,
"math":93,
"english":78,
"yearsOfEducation":9
},
{
"name":"Etta Potts",
"age":48,
"math":57,
"english":93,
"yearsOfEducation":7
},
{
"name":"Tate Moss",
"age":22,
"math":83,
"english":64,
"yearsOfEducation":8
},
{
"name":"Sanders Burris",
"age":27,
"math":65,
"english":66,
"yearsOfEducation":5
},
{
"name":"Latoya Malone",
"age":35,
"math":100,
"english":100,
"yearsOfEducation":5
},
{
"name":"Wade Foreman",
"age":25,
"math":76,
"english":87,
"yearsOfEducation":10
},
{
"name":"Miller Valentine",
"age":31,
"math":56,
"english":89,
"yearsOfEducation":6
},
{
"name":"Rita Olson",
"age":53,
"math":100,
"english":52,
"yearsOfEducation":6
},
{
"name":"Potter Newton",
"age":29,
"math":91,
"english":75,
"yearsOfEducation":5
},
{
"name":"Madeline Bartlett",
"age":23,
"math":60,
"english":74,
"yearsOfEducation":10
},
{
"name":"Tamara Tran",
"age":46,
"math":73,
"english":78,
"yearsOfEducation":4
},
{
"name":"Elena Evans",
"age":43,
"math":60,
"english":82,
"yearsOfEducation":10
},
{
"name":"Cote Merrill",
"age":55,
"math":86,
"english":63,
"yearsOfEducation":7
},
{
"name":"Madeleine Brennan",
"age":52,
"math":82,
"english":88,
"yearsOfEducation":4
},
{
"name":"Alford Weber",
"age":38,
"math":71,
"english":85,
"yearsOfEducation":4
},
{
"name":"Kirsten Daniel",
"age":35,
"math":86,
"english":61,
"yearsOfEducation":8
},
{
"name":"Melton Chan",
"age":26,
"math":55,
"english":96,
"yearsOfEducation":4
},
{
"name":"Mcmahon Woodward",
"age":54,
"math":56,
"english":63,
"yearsOfEducation":9
},
{
"name":"Helga Monroe",
"age":29,
"math":79,
"english":92,
"yearsOfEducation":5
},
{
"name":"Patricia Herrera",
"age":46,
"math":94,
"english":99,
"yearsOfEducation":10
},
{
"name":"Mccullough Lambert",
"age":56,
"math":65,
"english":96,
"yearsOfEducation":8
},
{
"name":"Haynes Davidson",
"age":60,
"math":86,
"english":50,
"yearsOfEducation":5
}
]
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution
Trending nowThis is a popular solution!
Step by stepSolved in 2 steps with 2 images

Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- Please answer the question in the screenshot. The language used here is Java.arrow_forwardEvery data structure that we use in computer science has its weaknesses and strengthsHaving a full understanding of each will help make us better programmers!For this experiment, let's work with STL vectors and STL dequesFull requirements descriptions are found in the source code file Part 1Work with inserting elements at the front of a vector and a deque (30%) Part 2Work with inserting elements at the back of a vector and a deque (30%) Part 3Work with inserting elements in the middle, and removing elements from, a vector and a deque (40%) Please make sure to put your code specifically where it is asked for, and no where elseDo not modify any of the code you already see in the template file This C++ source code file is required to complete this problemarrow_forward1. Write a program that defines a struct named Info. That Info struct should define two strings, a double and array of strings. In your main program, define a variable v using that Info struct and then initialize it to hold your first name, your last name, your lucky non-whole number (e.g. 26.5), your major, and a listing (an array) of your six most favorite college courses you have ever taken or plan to take. Then your program should access and print all the stored data held in the variable v. 2. print the data twice, once using the structure variable and do-while loop, and next using a pointer variable and a while-do loop.) Using the embed icon shown above show screenshots demoing the execution of your program.arrow_forward
- Write a C++ program define a vector object and initialize it with 3 values and then define an iterator that points to elements of this object, then ask the user to enter 3 more values and then add them to the previous vector and then print all elements in the vector.arrow_forwardA pointer variable is just what it sounds like. What is its purpose? Exactly what does it mean to have a "dynamic array"? Pointers and dynamic arrays have what relationship?arrow_forwardClasses, Objects, Pointers and Dynamic Memory Program Description: This assignment you will need to create your own string class. For the name of the class, use your initials from your name. The MYString objects will hold a cstring and allow it to be used and changed. We will be changing this class over the next couple programs, to be adding more features to it (and correcting some problems that the program has in this simple version). Your MYString class needs to be written using the .h and .cpp format. Inside the class we will have the following data members: Member Data Description char * str pointer to dynamic memory for storing the string int cap size of the memory that is available to be used(start with 20 char's and then double it whenever this is not enough) int end index of the end of the string (the '\0' char) The class will store the string in dynamic memory that is pointed to with the pointer. When you first create an MYString object you should…arrow_forward
- What is the difference between the size and capacity of a vector?arrow_forwardYou are required to write a program that creates a mini database of HairColor objects..... For this, create a structure HairColor with fields brand – string color - string price - float totalVolume – float currentVolume – float // amount of volume currently available. You need to provide following functions in the struct Provide a function print() so that when called, this function prints the details about the Hair color in formatted manner. IsAvailable(String Technique) which checks the volume of color in the bottle if available for the required technique then returns true otherwise false. isEmpty() this will check whether the bottle is empty or not. You need to provide the function apply (String technique). This function represents the action of applying hair color to hair based on technique user selects Techniques are (highlight, Bronde, Ombre, Sombre) also note down please check that the color is available because volume required for each type of technique is different as for…arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education

Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON

Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education