Create student sorting table

Assignment Help PL-SQL Programming
Reference no: EM13161569

Student.txt in the attachment contains the roster of a class. Each student object has the following fields:

student id, last name, first name, academic level.

Create a RosterClass to store the student database in vector.

RosterClass has "quickSort1" function that sorts students by id with the FIRST element as pivot. The function output each pivot and size of the list like this:

    pivot=3 list=3,2,1,17,.....

RosterClass has "quickSortM" function that sorts students by id with the MIDDLE element (size/2) as pivot. The function does the same output as above.

Write the output to PE4_xxxx.txt where xxxx is last 4 digit of your id. Submit output file and source codes through canvas.

Your main program shall include the following statements:

cout << "My name is (your name here), last 4 digits of id is (xxxx)\n";

...

RosterClass.quickSort1();

// printout the sorted list

...

RosterClass.quickSortM();

// printout the sorted list

****Student.txt File******

3, lin, frank, freshman

50, bush, george sr., junior

1, obama, michelle, freshman

17, boeing, dream, junior

4, linear, francisco, senior

5, obama, barack, senior

22, bush, george, junior

7, linux, fran, freshman

16, apple, steve, senior

15, broadcom, andre, senior

14, cisco, chris, junior

32, google, dino, senior

11, yahoo, tim, junior

20, motorola, kim, senior

13, amazon, bezos, senior

40, lockeed, cindy, junior

8, oracle, michelle, senior

19, facebook, mark, senior

18, oracle, larry, senior

 

 

Reference no: EM13161569

Questions Cloud

Finds the largest integer in the list recursively : Write a program that, given a list of 20 integers, finds the largest integer in the list recursively
Compute the formula for bobs indi erence curves : Compute the formula for Bob's indi erence curves by setting U(C, P) = k for some constant, k, and solving for P as a function of C and explain what this term means economically, and what it tells us about Bob's preferences, and about his willingnes..
Explain what mass of the unknown would be required to react : Consider an unknown that is approximately 50.% KHP. What mass of the unknown would be required to react with 40. mL of 0.10 M NaOH?
What are the phenotypic ratios in the f2 progeny : In whippets, wild-type dogs are skinny. A mutation in the myostatin gene causes dogs to become more muscular. Dogs containing one copy of the mutant myostatin gene are medium-muscled; dogs in which both copies of the myostatin gene are mutant are ..
Create student sorting table : Student.txt in the attachment contains the roster of a class. Each student object has the following fields: student id, last name, first name, academic level.Create a RosterClass to store the student database in vector.
Compute the mass of khp needed to react : Calculate the mass (grams) of KHP needed to react with 40. mL of 0.10 M NaOH. B. If 0.7528 g of KHP standard were titrated with NaOH and the endpoint was reached at 36.33 mL
Data file is a comma separated : The data file is a comma separated text values stored in a file with '.CSV' extension. The file has five columns corresponding to employee data fields listed above.
Calculate the amount of stock reagent : Calculate the amount of stock reagent.
State what is the vapor pressure of an aqueous : What is the vapor pressure at 75 degrees celcius of an aqueous solution prepared by the addition of 52.9 g of urea CO(NH2)2 to 178 g of water?

Reviews

Write a Review

PL-SQL Programming Questions & Answers

  Create a database model

Create a database model and Submit the table creation statements for the Database Model.

  Write pl-sql procedures and functions

Write PL/SQL procedures and functions to populate and query that database

  Sql questions

Write a query to display using the employees table the EMPLOYEE_ID, FIRST_NAME, LAST_NAME and HIRE_DATE of every employee who was hired after to 1 January, 1995.

  Run the lab_03_01.sql script

Run the lab_03_01.sql script in the attached file to create the SAL_HISTORY table. Display the structure of the SAL_HISTORY table.

  Write sql queries

Write a query to display the last name, department number, and salary of any employee whose department number and salary both match the department number and salary of any employee who earns a commission.

  Explaining sql insert statement to insert new row in cds

Write down a SQL insert statement to insert new row in "CDS" table.

  Write down name of actors in ascending order

Write down actors (or actress, your choice, but not both) who have won at least two (2) Academy Awards for best actor/actress. Provide the actor name, movie title & year. Order the result by actor name."

  What is an sql injection attack

What is an SQL injection attack? Explain how it works, and what precautions must be taken to prevent SQL injection attacks.What are two advantages of encrypting data stored in the database?

  Determine resonant frequency in series rlc resonant circuit

Given the series RLC resonant circuit in the figure, operating at variable frequency, determine: The resonant frequency ω o ,  The circuit’s quality factor Q , The cut-off frequencies, f 1  & f 2  and the bandwidth BW

  Query that uses cube operator to return lineitemsum

Write summary query which uses CUBE operator to return LineItemSum (which is the sum of InvoiceLineItemAmount) group by Account(an alias for AccountDesciption).

  Query to show customers were missing for existing orders

As DBA, your manager called a meeting and asked why there are so many orders for customers that don't exist in the customer table. Write query which would shows which customers were missing for existing orders. Use a join or a subquery.

  Sql query into a relational algebra statement

Turn this SQL query into a relational algebra statement? SELECT Request.reqfor, Ordering.invamt, Ordering.invnbr, Ordering.invdat

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd