Using Java compare how many swaps it takes a 1000 element array of integers. Use both quick-sort and heap sort. Only count when you swap values. Run the test in best case (array starts in sorted order), average case (array starts in random order), and in worst case array is sorted in reverse order. Print out the number of swaps for each sorting method's results.
In: Computer Science
1.Which of the following is NOT correct regarding browser-based database applications?
A.Browser-based applications are thin-client applications.
B.Browser-based applications are thick-client applications.
C.JavaScript is the standard language for user-side processing.
D.Languages like C# and Java are used for server-side processing.
E.Forms, reports, and queries are displayed and processed using html.
2.When the data model is converted to a database, which object on the model will become a column or fields in the table?
A.Attributes
B.Identifier
C.Integrity constraint
D.Record
E.Entity
In: Computer Science
How a piece of collected information remains in a server when the user inputs and even if we transfer the user to another web server in PHP it still remains? I need an algorithm for that requirement without using MySQL or tables. I need to handle the data when the users enter it and handle it to show it to another server?
In: Computer Science
What is a temporary table? Compare #temp and ##temp.
In: Computer Science
Write a Program for Examination depart of your college. Program
should take these inputs
Name, Roll No, Faculty, and All 4 Subjects Marks. After that Clear
the Console Screen & Print
an eye-catching Mark sheet. This is showing Name, Roll No, Faculty,
All 4 Subjects Marks,
Total Marks, Percentage, Grade and Remarks.
Follow below criteria for Grade & Remarks
Percentage Grade Remarks
>= 87 A Excellent
78 - 86 B+ Good
72 – 77 B Good
66 – 71 C+ Not Good
60 – 65 C Not Good
<= 59 F Very Bad
(Note Use Switch Case for Remarks)
C#
In: Computer Science
Create a vector of 100 integers PRG from 1 to 500. Find the max and min and print those out. Please use c++. Please use #include<iostream>, std::min_element, and std::max_element.
In: Computer Science
Using SHA 256 in Cryptool find the hash values (hash digests) for the following messages: (Show your work by capturing screen images)
In: Computer Science
use c++ language. Create a structure called time. Its three members, all type int, should be called hours, minutes, and seconds. Write a program that prompts the user to enter a time value in hours, minutes, and seconds. This should be in 12:59:59 format. This entire input should be assigned first to a string variable. Then the string should be tokenized thereby assigning the 1st token to hours, 2nd token to minutes, and 3rd token to seconds member variables of the structure called time. Finally inside a void Print_in_Seconds(void) member function of time structure, it should print out the total number of seconds represented by this time value: long totalsecs = t1.hours*3600 + t1.minutes*60 + t1.seconds
comment your code properly. do not use vectors
before coding explain it in simple words and use your own logic
In: Computer Science
prepare a presentation on the history of computers. There are 5 main steps of creating a presentation; Planning, Organizing and Composing, Preparing, Rehearsing, and finally presenting. prepare a brief presentation on the history of computers as you walk through these steps.
In: Computer Science
DESCRIPTION
Create a program to calculate and print basic stats on a set of a given input values representing students' scores on an exam.
1) Ask the user for the total number of exam scores to be input (assume a positive integer will be given).
2) Create an array to hold all the exam scores and then get all the scores from input to put into the array. For example, if the user input 10 in step (1) then you should create an array to hold 10 double values (each of the 10 exam scores) and ask the user for the 10 values, one-by-one, to put in each spot.
3) Calculate and print the average (mean) score.
4) Print out a table displaying the number of each letter grade in the set of scores. Assign grades of A for scores of 90 and above, B for scores of 80 and above (but below 90), C for scores of 70 and above (but below 80), D for scores of 60 and above (but below 70), and F for scores below 60.
Sample output of program:
How many exam scores?
10
Enter the 10 exam scores:
95.6
98
100
96
84.2
82
80
77
66
62.1
Average score: 84.09
Grade - Count:
A - 4
B - 3
C - 1
D - 2
F - 0
Starter Code:-
import java.util.Scanner;
public class ExamStats {
public static void main(String[] args) {
//TODO: Complete the program
}
}
In: Computer Science
In Python For this programming assignment, we are going to investigate how much "work" different sorting routines do, based on the input size and order of the data. We will record the work done by writing output CSV (comma separated value) files and creating various plots using matplotlib. Note: for this assignment, do not use Jupyter Notebook to code your solution. Use standard .py files and save your output to .csv and .png files (see the program details below for more on program output). Program Details: Data Structure Implement a doubly linked circular linked list of Node objects called CircularDoublyLinkedList. The data of each Node in the list is an integer. You will collect measurements for: An already sorted linked list An already sorted linked list in descending order A linked list containing random data List Size Configurations Generate each of the above linked lists with the following number of nodes: 500 1000 5000 10000 (more values if you wish) Note: Make copies of the original lists (as necessary) and pass the copies to each sorting routine so each routine is operating on the same data! This is important in order to compare the results of the different algorithms. Sorting Routines Implement 3 of the following linked list sorting routines (implemented as a function or as a method of your CircularDoublyLinkedList class): Choose 2 from the first 4 and 1 from the last 2 Selection sort Early exit bubble sort (stops when the list is sorted) Insertion sort Shell sort Merge sort Quick sort Data to Collect For each sorting routine above, create a pandas DataFrame with rows for each list size configuration and columns for each metric to collect. The metrics to collect include the algorithm's execution time using timeit and counts for the following operations: Number of data comparisons Number of loop control comparisons Number of assignment operations involving data Number of assignment operations involving loop control "Other" operations (operations that don't fall into one of the above categories) Total number of operations (sum of the above) Note: Be sure to comment everything you count in your code. Pictorially, here is an example DataFrame for a sorting routine: List configuration Seconds # Data # Loop # Data assignments # Loop assignments # Other Total Sorted N=500 Sorted N=1000 Sorted N=5000 Sorted N=10000 Descending sorted N=500 Descending sorted N=1000 Descending sorted N=5000 Descending sorted N=10000 Random N=500 Random N=1000 Random N=5000 Random N=10000 Program Output CSV Files Write the contents of each sorting routine DataFrame to a CSV file with a filename of the form _sort_results.csv. For example, bubble_sort_results.csv. See the function to_csv() in the pandas library for a straightforward way to do this! In total, your program should output 6 csv files, one for each sorting routine. Plots to Generate For each of the three list configurations (sorted, descending sorted, random), create two plots with list size on the x-axis (i.e. 500, 1000, 5000, 10000) and the following on the y-axis: Plot 1: running time Plot 2: total operation count Each plot should have a separate curve for each sorting routine. For example (example purposes only!!)
In: Computer Science
Select all that hold true about Bloom Filters:
Select one or more:
A. Bloom Filter has a predictable false positive rate. (Incorrect choices are penalized)
B. The total storage required for a Bloom Filter is fixed to be mm bits, and this won't increase regardless of the number of values stored.
C. Each search operation can be processed in the order
of O(n×k)O(n×k) by a Bloom Filter with kk hash functions
that already added nn values.
D. Each search or insert operation only requires O(k)O(k) operations by a Bloom Filter with kk hash functions and the cost does not depend on either the number of bits used by the Bloom Filter or nn, the number of values already added.
E. While the size of the bit array used by the Bloom Filter is constant, it may need to be quite large to reduce the false positive rate.
F. The Bloom Filter supports the following operations: add/insert the element, search the element, and remove the element.
G. While risking false positives, Bloom Filters have a strong space advantage over other data structures for representing sets, such as self-balancing binary search trees, tries, has tables, simple arrays or linked lists.
H. The Bloom Filter also stores the data items themselves that could be retrieved in O(k)O(k) time
In: Computer Science
35. Which of these is an open source operating system?
A.Open Office
B.Windows 10
C.Firefox
D.Linux
E.iOS
36.What happens when the tables are not normalized?
A.Nothing is affected.
B.The performance of querying tables is enhanced.
C.Taking a back-up of data becomes easy.
D.There is a data integrity problem.
E.Less number of records are loaded in tables.
In: Computer Science
Write an assembly code in MIPS program that can read 3 numbers from the user and print the following: a. The summation b. The average c. The minimum d. The maximum e. Print the values between the minimum and maximum f. Write comments to explain each line in your code -look at Fibonacci code- (no comments mean zero for the assignment )
use MARS MIPS .
In: Computer Science
In: Computer Science