Provide two methods on this library for sorting books

Assignment Help Computer Engineering
Reference no: EM132105019

Problem Statement:

This program will read books from an input file into your library data structure. A library consists of a list of books that can be in sorted or unsorted order.

As books are read in from the input file, just add them to an internal array that holds books. You will provide two methods on this Library for sorting books after they are read in from the data file. One sort function should sort by the publication year of the books.

The other should sort by the author of the book. One of your sorts should be written using SELECTION SORT. The other should be written with MERGESORT. You must write your own sort code. Do not use any built in C++ libraries for sorting.

Requirements:

You must be able to add books to your Library using an add method.

You must be able to sort your books in two manners using appropriate methods.

You must be able to display the books in the library after sorting using a print or display method.

You are not required to delete books from the list.

You must prompt the user for the name of an input file to read the books from.

Your list must be able to store at least 100 books. (Use arrays, not linked lists, - so that you can write a mergesort).

You may display your lists to the screen or to an output file. It is your choice. If you use an output file, allow the user to enter the name of the file.

Sample Output:

We The Living

Rand, Ayn

1936

The Sparrow

Russell, Mary Doria

1996

Foundation

Asimov, Isaac

1951

Hyperion

Simmons, Dan

1989

The Fifth Season

Jemison, N. K.

2015

Kindred

Butler, Octavia

1979

Watership Down

Adams, Richard

1972

Reference no: EM132105019

Questions Cloud

How many possible games of tic-tac-toe are there : Show the whole game tree starting from an empty board down to depth 2 (i.e., one X and one O on the board), taking symmetry into account.
How do international corporations utilize : How do international corporations utilize the media to enhance the public image of the firm during crisis?
Calculate the break even point : a) Calculate the Break Even Point(BEP) in units of output and sales(RM) using the contribution margin method
Calculate the revised break-even point : The projected sales for the following year for products X, Y, and Z are $800,000, $500,000 and $900,000 respectively. Calculate the revised break-even point (in
Provide two methods on this library for sorting books : Provide two methods on this Library for sorting books after they are read in from the data file.
Discussing the importance of accreditation : Discussing the importance of accreditation and credentialing, strategies for quality improvement, and the role of statistics and statistical forecasting
Variant of undirected hamilton path : The language in question is the set of all triples (G, s, t) for which G is an undirected graph with maximum degree at most 2 containing a Hamilton path.
Plastic bottles for medicinal product : A company manufactures various-sized plastic bottles for its medicinal product. The manufacturing cost for small bottles is $75 per unit
How many of them has 3 or 8 as one of its digits : For integers between 1 and 1000, how many of them are divisible by 3 or 8? How many of them are divisible by 4 or 6?

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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