Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hello! Im a little confused as to what I should do in regards to this assignment could you help. Objectives: The major advantage of using

Hello!
Im a little confused as to what I should do in regards to this assignment could you help. image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
Objectives: The major advantage of using structs is to make the C++ code simpler, easier to read and easier to work with. After completing this assignment, students will be able to: use structs to create and/or introduce new custom data types implement structs to group fixed numbers of pieces of data of different types . . implement structs within structs chaining using the dot operators to access nested fields copy an entire structure create an array of a structured data type combine structs and arrays with one another e . Program Description: Mary has found a collection of books (Books.txt) and a list of her favorite authors Authors.txt) Your goal is to write a program for Mary, that allows her to browse both the book list and her favorite author list. The program should also display books written by her favorite authors in addition to their nationality which she does not know up Brittne ssignmentI Description 1(dcx Protected View Seved to this PC References Mailings Revien Vie Help Tell me what you want to d he ndenet can centain viuses Unles you need to edit it's sler to stay in Protected VierwEnable Edeing The main0 function should only contain the MemuO function, which mmust display the available options The program must only tenminate upon the user's command (yos can inchade this as an option) The rest of the fanctionality should be invoked through fiunctions from within Menu0 There ase two txt files. Each line in a file cocresponds to an entry. You should store all informatice cn arrays dedicated to each file. Do NOT use global variables. If you do so there will be a deduction of 10 poisnts from your toteal points Books txt 1. Book title 2. Author name 3. Year of publication in English language 4. Language originally written in 5. Geare up Eittney Hines Authors td 1 Name Date of Burth 3 Most Notable Book Task l: Mary wants to be able to read the file Create a Book stnact that will retain all information that is present in the file. Create an array that will contain sach information From the first menu option, allow Mary to print the list The underscores in the title and author name should be removed Task 2 Similarly, Mary waets to print her favorite author List Create an Author struct Also, create a Date struct which will be an annbute of the Author struct, representing the date of burth Finally, add a nationality atribute which will not be filled when rrading the file. Just like in Task 1, create an authoes array of type tract Frome second sem optiot, print the aubes; de e of birshould exclude the day even though it is included in the filefwhether the Date stract will coctain a "day abute is up to you). The underscoee in the author's namme and most notable work should be removed Task 3 Mary wants to find books by her Eavoride authors in the list The third option in the menu, should print the esthot, his nationalaty (vatme as language book was originally wries im), and the book tidle. There will only be one book matched for each author Hiats When trying to ressove the usderscores, remember that a string is an array of characters, and that each e to search though it is inchuded in the filet wbethes the Date stract wall cestain a "day" atrbute is up to you) The underscore nthe author's name and most notable work should be removed Tank 3 Mary wanta to fnd books by her favorite authors-e listThe third option in the menu, should print wthor, his nationality (same as language book was on iginally wnien in), and the book title. Thene the will oaly be one book matched for each author Hints When trying to remove the undenscoees, remember that a staring is an array cheracter can be manipalated Use separate functions for print and for reading Please check the attached "Ceding Rubric for the grading enteria of charactens, and that each Sabmission aotes for Task Zap the extire Code Blocks project containing all the cpp, h, cbp files and name the zipped file Assgl slogin zip", where the cslogin is your login ID for the computers at the Department of Computer Science at ODU Subenit the nipped fille using the appropriate Blackboard link Type here to seach Mca2596/71541112 Obiectives The main obijoctive of this assigament is checking students' ability to implement membership fuanctions After completing this assignment, students will be able to implement member functions e convert a member function into a standalone function e convert a standalone function into a member function . call member functions implement constructors use structs for function overloading Problemdescription: In this assignment, we will revisit Assignment #1. Mary has now created a small commercial library and has managed to collect sales data. She wants to be able to print the books based on sales, and the list of authors based on their date of birth This assignment needs the structs Book, Author, Date, and Library Processing inventory She wants to display the books by popularity, thus the program must print based on sales, from highest to lowest. You will need to save the output into a text file named OrderedBooks.txr. Ubilize the Book struct to implement the desired functionality. books Similaty, Mary is interested in displaying the aulhors by age, printing the oldest authors finst. An output filed OrderedAuthorstxt should be created. Appropriate operations mast be implemented inside the Author struct, and properly use the Data struct to compare author ages Finally, utilize the Library stract to store the lists of authors and books, and contain the functionality that the librarian roqaires Yon maut use hoth memher functions and nos.member fiunctions Ce of the Rook or Author sortino lype here to search 0 5 6 8 9 leam.xythos.prod/5a 3434 ca259b6/7 1 84 1 1 1 7response-content-dispositions inline%3 %3DUTF-8%27% Similarly, Mary is interested in displaying the authors by age, printing the oldest authors first. An output filed Ordered Authors.axt should be created. Appropriate operations must be implemented inside the Author struct, and properly use the Data struct to compare author ages. Finally, utilize the Library struct to store the lists of authors and books, and contain the functionality that the librarian requires. You must use both member functions and non-member functions. One of the Book or Author sorting mechanisms must be implemented via member function (you can choose which) and the other with a non-member function. You must use constructors to initialize all data variables in structs with default values at the beginning of the program. Use of global variables will incur a deduction of 10 points from your total points Haruki_Murakami 01/12/1949 A wild_Sheep_Chase Leo_Tolstoy 09/09/1828 War_and Peace Fyodor_Dostoevsky 11/11/1821 Crime_and Punishment Nikos_Kazantzakis 02/18/1883 The Last_Temptation Charles Bukowski 08/16/1929 Post Office George_Orwell 06/25/1903 1984 John_Milton 12/09/1608 Paradise Lost 643 D C https://s3.us-east-1a 59b6/6467567tresponse-ca The Name of the Rose Umberto Eco 1983 Italian Mystery 129 Norwegian Wood Haruki Murakami 200 3apanese Fiction 6800 The Name of the Wind Patrick Rothfuss 2007 English Fantasy 4928 The Girl with the Dragon_ Tattoo Stieg Larsson 2005 Swedish Thriller 7049 The Brothers Karanazov Fyodor Dostoevsky 1888 Russian Fiction 6948 Desonic Males Richard_Wrangham 1997 English Non-Fiction 1209 Har_ and Peace Leo Tolstoy 1899 Russian Historical-Fiction Baudolino Umberto Eco 2800 Italian Historical-Fiction 2134 The Lies of Locke Lamora Scott Lynch 2006 English Fantasy The Last_of_the Wine Mary Renault 1956 English Historical-Fiction Brave_New World Aldous Huxley 1932 English Science-Fiction 4677 5890 6676 579 Type here to search

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases A Beginners Guide

Authors: Andy Oppel

1st Edition

007160846X, 978-0071608466

Students also viewed these Databases questions

Question

please dont use chat gpt AI 8 0 . .

Answered: 1 week ago