Create an array of structures containing structure members

Assignment Help Computer Engineering
Reference no: EM132106366

Your program is to check to see if a file called "reading_list.txt" already exists and if it does, read it into an array of structures of type book_list.

You will define a structure called book_list that will hold a number associated with each book (int), book title (string), author (string), a description of the book (string), a date when the book was read stored in 2 parts - month (int) and year (int) and a rating of the book (int).

The number will be generated by the program as each book is entered. The rating should be limited to a number between 1 and 10. It will be a scale the user can enter what they thought of the book.

The program should have a menu that asks the user to 1) print books 2) enter a new book 3) modify a book 4) print how many books are in the list 5) print all of the books that have a certain rating 6) exit the program. If the user enters 1, all of the books will be printed to the screen including the book number. If the user enters 2, the program will ask the user for the title, author, description, date, and rating.

If the user selects 3, the program should ask the user for the book number to be modified and all of the new information for that book. If the user selects 4, you are to print the total number of books in the database to the screen.

When the user enters 5, you are to ask for the rating and then print out only the books with that rating. When the user selects 6 to exit the program, you are to create a new file or overwrite the existing file and write each record to the text file "reading_list.txt".

****Structure member definitions:

Book number - to be generated by the programmer for each new book that is entered

Book title - This should be a able to hold spaces

Author - should be able to hold spaces

Description - should be able to hold spaces

Date - should be a month stored as 1 - 12 and year stored with all four digits, i.e. 2017. It should be printed at XX/XXXX i.e 9/2016

Rating - should be a number between 1 and 10

*******Requirements:

Create an array of structures containing the structure members as defined above

The program needs to be able to handle data for up to 500 books.

Read the data from the file "reading_list.txt" and save each book record in a structure in your array when you start your program. (Only read once.)

Write to the file once - when the user selects exit.

The title, author, and description should be able to contain spaces.

Book numbers must start with 1 and be generated by the program

Reference no: EM132106366

Questions Cloud

A program draw a rectangle on the screen : You have a program draw a rectangle on the screen and allow the user to change the color/size of the rectangle.
Qualitative methods of describing a type of behavior : Please compare quantitative and qualitative methods of describing a type of behavior.
How does pc change after executing a 16-bit instruction : How does PC change after executing a 16-bit instruction? An arithmetic and logic unit (ALU) performs integer and logic operations.
When solving for anova can f have a negative value : When solving for ANOVA, can F have a negative value? Can SS have a negative value?
Create an array of structures containing structure members : Create an array of structures containing the structure members as defined .The program needs to be able to handle data for up to 500 books.
Hormonal influences in fetal development : Do you believe that our genes and hormonal influences in fetal development are precursors to gender specific brain structure?
Why do you think we sleep : Why do you think we sleep? Do you think dreams are messages from our psyche? What do you think is the purpose of dreams?
How does severity relates to possible intention of someone : How does severity relates to possible intention of someone thinking about suicide or self-harm?
Development of an individual personality : Describe how gender role differences might impact the development of an individual's personality.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Why we cannot apply likelihood weighting to markov networks

Explain intuitively why we cannot simply apply likelihood weighting to Markov networks. Show how likelihood weighting can be applied to chordal Markov networks.

  Computing the unit price of items

The Manager of the Supermarket would like to be able to compute the unit price of items sold there. To do this the program must input the name and the price of item and its weight in pounds and ounces.

  By assessing the itsec tcsec and also other assessment

the normal criteria was instituted to bring together the different safety assessment systems available in the world. by

  Which often used fraudulently to obtain immigration benefits

Which of the following are most often used fraudulently to obtain immigration benefits? Which of the following is true regarding the theft of computers as a physical method of identity theft?

  Create a program for an automatic teller machine

Write a program for an automatic teller machine that dispenses money. The user should enter the amount desired (a multiple of 10 dollars) and the machine dispenses this amount using the least number of bills.

  Develop a website based on the design document

Develop a website based on the design document you submitted for Website Design Document assignment. This website must contain a minimum of 10 pages.

  Describe the best approach to integrating domain-specific

q1. write a 200- to 300-word short answer response that addresses the followingwhat is the best approach to integrating

  What components and attributes will need to be included

A national builder has hired your software development firm. What components and attributes will need to be included in your home class? Why?

  What was the starting state

The circuit shown below gave an output sequence of Z = 11011111 for an input sequence X = 01101010. What was the starting state?

  How do you include a loop structure programming in python

Explain when we would use each. How do you include a ‘loop' structure programming in Python? How do you control a loop? What you found that was new and exciting that you plan to use personally.

  Give an example of a text t of length n and a pattern p

Give an example of a text T of length n and a pattern P of length m that force the brute-force pattern matching algorithm to have a running time that is ?(nm).

  Write a paragraph describing the interaction with each thing

Write a paragraph (5-8 sentences) describing the interaction with each thing. Was it successful or not? In what ways? Where did breakdowns occur?

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