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
Create a
a. contains 10 rows
b. the length of the first row is 10, next row is 9…and the last row is 1
c. each index contains the sum of its indexes
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by stepSolved in 4 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
- JAVA PROGRAM Lab #2. Chapter 7. PC #11. Array Operations (Page 491) Write a program that accepts a file name from command line, then initializes an array with test data using that text file as an input. The file should contain floating point numbers (use double data type). The program should also have the following methods: * getTotal. This method should accept a one-dimensional array as its argument and return the total of the values in the array. * getAverage. This method should accept a one-dimensional array as its argument and return the average of the values in the array. * getHighest. This method should accept a one-dimensional array as its argument and return the highest value in the array. * getLowest. This method should accept a one-dimensional array as its argument and return the lowest value in the array. double_input1.txt double_input2.txt…arrow_forwardWrite a Java application for a grade book using arrays: Create an array to store 20 test grades, random numbers between 0-100, inclusive. Print these 20 grades Calculate and print the average grade Calculate and print the highest and lowest grades Complete BMI arrays template BMI.java Use two int arrays to store n numbers from user input, called height[] and weight[]. "The BMI is defined as the body mass divided by the square of the body height" Calculate BMIs and store values into a double array called bmi[]. Write a method to print an array, use an enhanced for loop in the print method. Print the BMIs by invoking the print method. import java.util.Scanner;public class BMI{public static void main(String[] args){Scanner key = new Scanner (System.in);int num = // use Scanner object to get an integer// declare an int array for heightint[] height = new int[num];// declare an int array for weight below...// declare an array for BMI array...for ( ){ // iterate all array…arrow_forwardWrite a C# code that contains a two dimensional integer array which has the size 3x4; • A random number (between 25 and 75) will be assigned to each element of the array. Elements will be shown in matrix format at Console window. • The transpose of the array will be written to the "myFile.txt" file. An example after running the program The content of myFile.txt | myFile - Notepad File Edit Format View Help Console window C. C:\Windows\sys.. 64 71 26 57 68 57 35 42 47 46 70 73 Press any key to continue 64 68 47 71 57 46 26 35 70 57 42 73arrow_forward
- Write a program which allow user to enter a number that represents repetition. Then, the userwill need to enter any random decimal number based on the number of repetition. The numbersshould be stored in a single dimensional array. Lastly, the program will display the averageof these numbers and count how many numbers that above the average.arrow_forwardJava code 8. Given an existing ArrayList named friendList, find the first index of a friend named Sasha and store it in a new variable named index. 9. Given that an ArrayList of Integers named numberList has already been created and several values have already been inserted, write the statement necessary to insert the value 25 at the end of the list. 10. Declare an integer array named evens and fill it with even numbers from 2 through 10 in one statement. 11. Given an existing array named pets, find the size of the array and store it in a new variable named numPets. 12. Given an existing ArrayList named contactList, find the number of contacts in the ArrayList and store it in the existing variable named numContacts.arrow_forwardWrite a program that simulates a lottery. The program should have an array of five integers named winningDigits, with a randomly generated number in the range of 0 through 9 for each element in the array. The program should ask the user to enter five digits and should store them in a second integer array named player. The program must compare the corresponding elements in the two arrays and count how many digits match. For example, the following shows the winningDigits array and the Player array with sample numbers stored in each. There are two matching digits, elements 2 and 4. WinningDigits 7 4 9 1 3 player 4 2 9 7 3 Once the user has entered a set of numbers, the program should display the winning digits and the player’s digits and tell how many digits matched. Working program Complete indentation, proper use of variables Comments on your programarrow_forward
- Open Pycharm on your PC and create python file named Lab6.py. 1- Write the necessary code to initialize a numpy array (5,3,3) as follows: [[[6 2 6] [6 2 6] [6 2 6]] [[666] [666] [666]] [[666] [333] [666]] [[666] [666] [666]] [[7 6:6] [6 7 6] [667]]] 2- Generate a (7, 7) numpy array that consists of integer random values between 10 and 50 and answer the following: a. What is the minimum value in each column b. What is the mean for each row c. Generate the cumulative product of each column d. Count the number of elements in the array whose values are greater than 30 and smaller than 40 e. Display the elements in the arrays that equals to 20 f. Multiply by 5 the elements whose value is less than 30. g. Display the largest 5 elements in the array 3- Define two numpy 1D arrays X and Y; initialize them to random numbers between 0 and 100 and print the elements in X that do not exist Y.arrow_forwardIn this project you will generate a poker hand containing five cards randomly selected from a deck of cards. The names of the cards are stored in a text string will be converted into an array. The array will be randomly sorted to "shuffle" the deck. Each time the user clicks a Deal button, the last five cards of the array will be removed, reducing the size of the deck size. When the size of the deck drops to zero, a new randomly sorted deck will be generated. A preview of the completed project with a randomly generated hand is shown in Figure 7-50.arrow_forwardTASK 1. Prior to writing your code, you will create an input file for this assignment yourself and name it input.txt. Open the CreateInput.java file, attached to this assignment in Blackboard and analyze its code. Find the 2D array of items and add three more grocery items and their type of your choice into this array. In the same code, find an array of countries and add two more countries of your choice to this 1D array.arrow_forward
- Write a computer program for searching an array consist of following numbers. [ 12 32 73 95 23 45 26 48 83 24 56 19 23 28 45 ] User enters a number for searching. If an array does not contain the number to the last row of the array. If the number is still exists, script outputs the text message " The number is already exists".arrow_forwardUsing Java Scriptarrow_forwardquery the user for the size of an array of integers build an array of integers and fill it with random integer values. The values will range between 0 and 100 display the array clone the array display the cloned array sort the cloned array display the original array and the sorted cloned array create another array that is double the size of the cloned array and copy the data from the cloned array into the new array. Then fill the remaining cells in the new array with random values. These will also range between 0 and 100.Note: int[] newArray = new int[clone.lenght*2] Write program in jvaarrow_forward
arrow_back_ios
SEE MORE QUESTIONS
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