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

  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?

  Write sql statement to produce single column

Write an SQL statement to produce a single column called ItemLocation that combines the SKU_Description,the phrase "is located in."

  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.

  Write pl-sql block which displays last name

Write PL/SQL block which displays last name and salary of following people. Each of these can be done separately as PL/SQL, first to test and get output lines

  Create a database model

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

  Sql statements to create tables using sql ddl statements

Write SQL statements to create the above tables using SQL DDL statements. Write an INSERT statement to add two new records to each table.

  Write pl-sql block that displays last name

Write PL/SQL block which displays last name and salary of following people. Each of these can be done separately as PL/SQL, first to test and get output lines.

  Write command to list all the employees in year

Write the command to list all the employees hired in 2003 and 2004. Sort the rows by the hire_date column in descending order.

  Write queries in sql and relational algebra

Write given queries in SQL and relational algebra: Determine cities from which one can fly to Toronto with one change of planes, and using same type of the aircraft for both legs of trip.

  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.

  Write sql statement to display first-last name of students

Write a SQL statement to display the First and Last name of students who have the Status greater than 1 and less than 10. Use BETWEEN.

  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.

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