Write a C program that will load entries from a file containing details of books and prints them.

Program Requirements:
a. Load file containing details of books
b. Print out all the books Required approach:

1. Design a struct/class that can hold the details of an individual book.
2. Dynamically allocate an array of these objects. The size should be the number of book entries from the input file given by the user.
3. Load all of the book entries into this array of objects before printing

Answers

Answer 1

Answer:

........

Explanation:


Related Questions

We have an N x N square grid.


We will paint each square in the grid either black or white.

If we paint exactly A squares white, how many squares will be painted black?

A and N are integers,

Print the number of squares that will be painted black.
C++

Answers

Answer:

The solution in C++ is:

#include <iostream>

using namespace std;

int main(){

   int N, A;

   cout<<"Grids: ";    cin>>N;

   cout<<"White: ";    cin>>A;

   cout<<"Black: "<<N * N - A;

   return 0;

}

Explanation:

This declares N and A, as integers

   int N, A;

This gets inputs for N

   cout<<"Grids: ";    cin>>N;

This gets inputs for A, (the white grids)

   cout<<"White: ";    cin>>A;

This calculates and prints the number of black grids

   cout<<"Black: "<<N * N - A;

PS

From the question, we understand that the grid is N by N square grids.

This means that:

[tex]Total = N * N[/tex]

So, the number of black grids is:

[tex]Black = Total - A[/tex]

The process by which the kernel temporarily moves data from memory to a storage device is known as what?

Answers

Answer: Swapping

Explanation:

Swapping is referred to as the process by which the kernel temporarily moves data from memory to a storage device.

Swapping is simply a memory management scheme whereby the process can be swapped temporarily from the main memory to the secondary memory in order for the main memory to be available for other processes. Swapping is used for memory utilization.

What is the full form of USB​ ?

Answers

Answer:

universal serial bus: an external serial bus interface standard for connecting peripheral devices to a computer, as in a USB port or USB cable.

Explanation:

which animal is the computer to store data information and instruction ​

Answers

Answer:

human is the answwr of the quest

Use the Internet to research external storage devices. Find at least three devices, with a minimum storage size of 1 terabyte (TB), from three different manufacturers. Write a paragraph, IN YOUR WORDS, for each device explaining the features and benefits. Provide the retail cost and include a reference link to each device. Next, write

Answers

Hi, you've asked an incomplete question. However, I provided suggestions on getting the desired information.

Explanation:

Considering the fact that you are required to find information about not just the cost, but also the features and benefits of three storage devices having a minimum storage size of 1 terabyte, it is recommended that you check this on a reputable e-commerce site (eg Amazon).

There you could find information about their features and benefits, as well as customer feedback about their experience using these devices.

Consider a system with seven processes: E, F, G, H, I, J, K and six resources: U, V, W, X, Y, Z. Process E holds U and wants V. Process F holds nothing but wants W. Process G holds nothing but wants V. Process H holds X and wants V and W. Process I holds W and wants Y. Process J holds Z and wants V. Process K holds Y and wants X. Is this system deadlocked?

a. Yes
b. No

Answers

Answer:

a. Yes

Explanation:

System is deadlock due to process HIK. Process H holds X and wants V and W. Process I holds W and wants Y. Process K holds Y and wants X. The system will become deadlock due to these three different processes.

discuss extensively, the historical development of public Administration​

Answers

History

Early systems

Public administration has ancient origins. In antiquity the Egyptians and Greeks organized public affairs by office, and the principal officeholders were regarded as being principally responsible for administering justice, maintaining law and order, and providing plenty. The Romans developed a more sophisticated system under their empire, creating distinct administrative hierarchies for justice, military affairs, finance and taxation, foreign affairs, and internal affairs, each with its own principal officers of state. An elaborate administrative structure, later imitated by the Roman Catholic Church, covered the entire empire, with a hierarchy of officers reporting back through their superiors to the emperor. This sophisticated structure disappeared after the fall of the Western Roman Empire in the 5th century, but many of its practices continued in the Byzantine Empire in the east, where civil service rule was reflected in the pejorative use of the word Byzantinism.

The function of while loop is
a. Repeata chunk of code a given number of times.
b. Repeat a chunk of code until a condition is true.
c. Repeata chunk of code until a condition is false.
d. Repeata chunk of code indefinitely.​

Answers

Answer:

B repeat a chunk of code until the condition is true im 88% sure

While using PERT (Program Evaluation Review Technique) and CPM (Critical Path Method) techniques, activities that are on the critical path are more flexible than those activities which are not on the critical path.

a. True
b. False

Answers

Answer:

b. False

Explanation:

The Critical Path Method(CPM) is used to determine the maximum time to finish a project based on the total maximum time of the network of interdependent activities in the project. The CPM is usually used in conjunction with the Program Evaluation Review Technique(PERT). If an activity is in the critical path then it is at its maximum or longest duration time and cannot be more flexible at this point.

Select the correct statement(s) regarding PONS. a. only MMF cables can be used, since MMF enables greater data capacities compared to SMF b. PONS systems require active amplifiers, since high frequency signals attenuate quickly over distance c. PONS systems use passive devices between OLT and ONT d. all are correct statements

Answers

Answer:

The correct statement regarding PONS is:

c. PONS systems use passive devices between OLT and ONT

Explanation:

PON means Passive Optical Network. Based on fiber-optic telecommunications technology, PON is used to deliver broadband network access to individual end-customers.  It enables a single fiber from a service provider to maintain an efficient broadband connection for multiple end-users (homes and small businesses).  OLT means Optical Line Terminal, while ONT means Optical Network Terminal.  They provide access to the PON.

There is an interface I that has abstract class AC as its subclass. Class C inherits AC. We know that C delegates to an object of D to perform some computations. Besides, C consists of two C1s and one C2 as subcomponents. Object of C2 is still reusable when its major component C is depleted. C1 has a method that takes in an object of E as argument. Which one is invalid

Answers

Answer:

are u in HS or college work

I am trying to understand

Study the following two class interfaces: class Question { public: Question(); void set_text(string new_text); void set_answer(string new_answer); void display() const; private: string text; string answer; }; class ChoiceQuestion : public Question { public: ChoiceQuestion(); void set_text(string new_text); }; Which member function from the Question class is overridden in the ChoiceQuestion class?

Answers

Answer:

The question function

Explanation:

The ChoiceQuestion function inherits from the Question class and should have it's functions and attributes as it is now a child of the Question class. It however overides the Question class function where it sets the ChoiceQuestion class function in the first function definition of the ChoiceQuestion class definition. This allows the child class to have it's own functions as well have access to the attributes and functions of the parent class.

If one wish to create a loop such that it will continuously add time elapsed between two functions with variable computation time until 1 hour is passed, what type of loop would be best

Answers

"Between two functions" not sure of what you mean there but here's a quick way to execute a function for an hour

Answer and Explanation:

var interval=setInterval(function(){

var i=0;

for (i=0; i <=60; i++){

for (i=0; i <70; i++){

console.log(i); }

}}, 60000);

convert 198 / 61 to ratio​

Answers

I think the answer is

198:61

I'm not sure

Imagine you are trying to choose what restaurant to visit. You have a list of restaurants, each with a collection of star ratings. You also have a minimum standard; you will only go to a restaurant whose star rating is at least your minimum standard. Write a function called restaurant_rating. restaurant_rating has two parameters. The first is a dictionary, where the keys are restaurant names and the values are lists of ratings. The second parameter is your minimum rating. If a restaurant's average rating is above your minimum rating, you might visit it. If it is not, you won't. restaurant_rating should return a list of restaurants eligible for you to visit. That is, it should return a list of restaurant names from the dictionary whose average ratings (the average of the ratings in their lists) is greater than or equal to your minimum rating. This list should be sorted alphabetically. For example: rest_and_rating

Answers

Answer:

The function in Python is as follows:

def restaurant_rating(restaurants,minRatings):

   restaurantList = []

   for key in restaurants:

       if restaurants[key] >= minRatings:

           restaurantList.append(key)

           

   restaurantList.sort()

   return restaurantList

Explanation:

This declares the function

def restaurant_rating(restaurants,minRatings):

This initializes the list of eligible restaurants

   restaurantList = []

This iterates through the restaurant dictionary

   for key in restaurants:

If the ratings is greater than or equal to minimum ratings

       if restaurants[key] >= minRatings:

The restaurant name is appended to the restaurant list

           restaurantList.append(key)

Sort the eligible lists            

   restaurantList.sort()

Return the list

   return restaurantList

DEFINITION of COMPONENT HARDWARE?

Answers

Answer: See explanation

Explanation:

Computer hardware refers to the physical parts of a computer, which includes the monitor, mouse, central processing unit (CPU), keyboard, computer data storage etc.

Hardware are the physical, computer devices, which helps in providing support for major functions like input, processing, output, and communication. The computer hardware is directed by the software to perform an instruction.

What are some of the advantages and disadvantages of connection-oriented WAN/Man as opposed to connection-less?

Answers

Answer and Explanation:

Connection oriented WAN/MAN as opposed to connection less network is a type of wide area network that requires communicating entities in the network to establish a dedicated connection for their communication before they start communicating. This type of network will use these established network layers only till they release it, typical of telephone networks.

Advantages include:

Connection is reliable and long.

Eliminates duplicate data issues.

Disadvantages include:

Resource allocation while establishing dedicated connection slows down speed and may not fully utilize network resources.

There are no plan B's for network congestion issues, albeit occurring rarely with this type of network.

For this assignment, you will use pointers to write a program that can be used to gather statistical data about the number of movies college students see in a month. The program should ask the user how many students were surveyed and dynamically allocate an array of that size. The program should then allow the user to enter the number of movies each student has seen. The program should then calculate the average, median, and mode of the values entered. Be sure to include comments throughout your code where appropriate.
Complete the C++ code

Answers

Answer:

Following are the program to the given question:

#include <iostream>//header file

#include <bits/stdc++.h>//header file

using namespace std;

int main()//main method

{

   int x,i,sum=0;//defining integer variable

   double average, median;//defining double variable

   cout<<"How many students were surveyed? ";//print message

   cin>>x;//input value

   int *a = new int[x]; //dynamically created array

   for(i = 0;i<x;i++)//defining for loop to input value in array

   {

       cout<<"Enter the number of movies seen by student number "<<i+1<<": ";//print message  

       cin>>a[i];//input value

   }

   for (int i = 0; i < x; i++)//defining loop for add value

       sum += a[i];   //use sum to add array value

   average = (double)sum/x;//defining average variable to calculate average

   cout<<"Average is "<<average<<endl;//print average value with message

   sort(a, a+x); //use sort method to sort array to find the median

   if (x % 2 != 0)//use if to check the even value

      median = (double)a[x/2];//calculating the median value

   else//esle block

       median = (double)(a[(x-1)/2] + a[x/2])/2.0;//calculating median value

   cout<<"Median is "<<median<<endl;//print median value with message

   int m_count=1 ,mode= a[0], c_count = 0;//defining integer variable

   for( i=1;i<x;i++)//defining for loop arrenge value

   {

       if(a[i]==a[i-1])//use if to check array value

       {

           c_count++;//increment c_count variable value

       }

       else//else block

       {

           if(c_count>m_count)//use if to check c_count greater than m_count

           {

               m_count = c_count;//holding value in m_count

               mode = a[i-1];//holding mode value

           }

           c_count = 1;//holding value integer value in c_count

       }

   }

   cout<<"Mode is "<<mode;//print mode value with message

   return 0;

}

Output:

Please find the attachment file.

Explanation:

Including header file.Defining the main method. Declaring integer and double type variables.Declaring integer array.Use the loop to the input value.After input, the value uses double variable "average, the median" that uses the for loop and conditional statement to check the value and hold in its variable.In the next step, another integer variable "m_count, mode, and c_count" is defined that uses the loop and conditional statement to check the median and mode value and hold its value into their variable.

Identify some advantages of using Excel over lists, paper files, or simple word documents? Describe some disadvantages of using Excel over lists, paper files, or simple word documents? Summarize one thing in you home life that could be improved or more easily managed using Excel?​

Answers

Excel

Excel is a software program that contains spreadsheet. Spreadsheet is an electric document that works numbers and display results in graphs. There are vertical columns and horizontal rows.

they are several advantages of excel which is;

Excel is very efficient to use, especially when you have to calculate your data, it's not hard to calculate the computer itself calculates it for you.

they are also disadvantages of excel which is;

some users might get a little bit problem when you send Microsoft Excel, here is one sometimes the spreadsheet are difficult to share internally.

What will be the output of the following code
1 Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
2
3
Pim val As Double
val - Math.Sqrt (12)
5
TextBox1.Text = val
6
7 End Sub

Answers

Answer:

3.4641016151377544

Explanation:

See picture for corrected code. The OCR messes up the code.

To dynamically change a reference line using parameter action, you first create a reference parameter. Next, add a parameter action for it. Finally, _____.a. add a reference line whose value follows a reference parameter.b. add the sheet you want to control as the bottom-right element in the layout.c. also add a URL action that points to the dashboard itself.d. add a reference line with a per pane scope and a tooltip.

Answers

Answer:

a. add a reference line whose value follows a reference parameter

Explanation:

To dynamically change a reference line using parameter action, you first create a reference parameter. Next, add a parameter action for it. Finally, "add a reference line whose value follows a reference parameter."

This is because to dynamically change a reference line using parameter action, one needs to do the following:

1. Attribute the reference line with a parameter

2. Utilize a parameter action to make the parameter interactive.

3. As your users interact with the view, the reference lines automatically update to deliver more context to the data.

Answer:

add a reference line whose value follows a reference parameter

Explanation:

add a reference line whose value follows a reference parameter

Kareem is working on a project for his manager. He has a few questions for a co-worker who he knows is knowledgeable on the subject. As they're discussing some of the topics, he gives the co-worker permissions to the resources so they can look at the information on their own. Which of the following access control methods does Kareem's company use?

a. DAC
b. RBAC
c. MAC
d. TSAC

Answers

Answer: RBAC

Explanation:

The access control methods that Kareem's company uses us the role based access control.

The Role-based access control (RBAC) simply means assigning permissions to users based on the role that such individual plays within an organization.

RBAC is a simple approach to access management and is typically less prone to error than in a scenario whereby permissions are assigned to users individually. Access rights are given to the workers based on what their job entails and what is needed and other information which isn't needed won't be accessible to them.

what is example of application of machine learning that can be imposed in eduction. (except brainly.)

Answers

Answer:

Machine Learning Examples

Recommendation Engines (Netflix)

Sorting, tagging and categorizing photos (Yelp)

Self-Driving Cars (Waymo)

Education (Duolingo)

Customer Lifetime Value (Asos)

Patient Sickness Predictions (KenSci)

Determining Credit Worthiness (Deserve)

Targeted Emails (Optimail)

Scenario You are a network engineer and it is your first day working with ASU and you have been given the job of creating a network for the IT program. You are given the following three tasks to complete. 1. Configure IP addressing settings on network devices. 2. Perform basic device configuration tasks on a router. 3. Verify Layer 3 connectivity via a routing protocol. 4. Setup some access control lists.

Answers

B because one cause…………………

Explain the bad effect and good effect of mobile phone and internet.

Answers

Internet goes out when you have a really old phone. The good thing is phones are a really good use to make contact to other people

Answer:

Bad effect of mobile phone: mobile phones can be a distraction and good effect is that your able to call for emergency and be able to connect with people.

bad effect of internet: internet can be deceiving when hearing a tragedy happen and the good effect is that your able to know news and important things.

If x=50.7,y=25.3 and z is defined as integer z,calculate z=x+y​

Answers

Answer:

Ans: 76

Explanation:

z=x+y

=50•7 + 25•3

=76#

Select the correct answer.
What testing approach does a development team use when testing the developed code rather than just the functionality of the code?
A.
white box testing
B.
black box testing
C.
acceptance testing
D.
usability testing

Answers

Answer:

D. usability testing

Explanation:

A software can be defined as a set of executable instructions (codes) or collection of data that is used typically to instruct a computer how to perform a specific task and to solve a particular problem.

A software development life cycle (SDLC) can be defined as a strategic process or methodology that defines the key steps or stages for creating and implementing high quality software applications. There are seven (7) main stages in the creation of a software and these are;

1. Planning.

2. Analysis and requirements.

3. Software design and prototyping.

4. Development (coding).

5. Integration and testing

6. Deployment.

7. Operations and maintenance.

Usability testing is a testing technique used by a software development team to test a developed code rather than just the functionality of the code.

The main purpose of usability (user experience) testing is to determine how easy, user-friendly or difficult it is for end users (real people) to use a software application or program.

It's currently 1:00 in the afternoon. You want to schedule the myapp program to run automatically tomorrow at noon (12:00). What two at commands could you use

Answers

Answer:

at 12 pm tomorrow

at now +23 hours

Explanation:

The at command could be used in the command line to perform a scheduled command in Unix related systems. The at command coule be ua d to program a complex script or used to perform simple scheduled reminders.

The at command is initiated by first writing the at string followed by the condition or statement to be performed.

Currently (1:00 pm) ; To make a schedule for 12pm then that will be at noon the following day:

at 12:00 pm tomorrow

Or :

Using the number of hours between the current tone and the schedule time : 12 pm tomorrow - 1:00 pm today is a difference of 23 hours ;

Hence, it can be written as :

at +23 hours

In which generation of computers are we in?​

Answers

It should be the Sixth generation

when describing a software lincense what does the phrase "open source" mean?

Answers

Open source is like we’re you can your your notes
Other Questions
can i get some help. did it 3 times and still not sure. Six teachers and 12 students volunteer for a committee to discuss extra-curricular activities. How many committees of 5 people can be made if: a) there must be exactly 3 students on the committee b) there must be at least one teacher and at least one student on the committee (3 marks) A second-order reaction has a half-life of 12 s when the initial concentration of reactant is 0.98 M. The rate constant for this reaction is ________ M-1s-1. A) 12 Need helppppp asappp 1. 80 = -10b 2. 6 = 2n3. -16r = 321.2.3. The longest leg is Select one:a. 53b. 103c. 5d. 20 Does anyone know how to do these? find the exact value of tan -75 Write a program that opens the salesdat.txt file and processes it contents. The program should display the following per store: The total sales for each week. (Should print 5 values - one for each week). The average daily sales for each week. (Should print 5 values - one for each week).The total sales for all the weeks. (Should print 1 value)The average weekly sales. (Should print 1 value)The week with the highest amount in sales. (Should print 1 week #)The week with the lowest amount in sales. (Should print 1 week #)The file contains the dollars amount of sales that a retail store made each day for a number of weeks. Each line in the file contains thirty five numbers, which are sales numbers for five weeks. The number are separated by space. Each line in the file represents a separate store.//FileIO.javaimport java.io.BufferedReader;import java.io.FileReader;import java.io.IOException;public class FileIO { //Franchise readData(String filename) public static void main(String[] args) { try { FileReader file = new FileReader("Salesdat.txt"); BufferedReader buff = new BufferedReader(file); boolean eof = false; while (!eof) { String line = buff.readLine(); if (line == null) eof = true; else System.out.println(line); } buff.close(); } catch (IOException e) { System.out.println("Error -- " + e.toString()); } }}//Store.javapublic class Store { private float salesbyweek[][]; Store() { salesbyweek = new float[5][7]; } //getter and setters //setsaleforweekdayintersection(int week, int day, float sale) public void setsaleforweekdayintersection(int week, int day, float sale){ salesbyweek[week][day]=sale; } //float [] getsalesforentireweek(int week) //float getsaleforweekdayintersection(int week, int day) //businessmethod //a. totalsalesforweek //b. avgsalesforweek //c. totalsalesforallweeks //d. averageweeklysales //e. weekwithhighestsaleamt //f. weekwithlowestsaleamt //analyzeresults //call a through f //print()}//Franchise.javapublic class Franchise { private Store stores[]; public Franchise(int num) { stores = new Store[num]; } public Store getStores(int i) { return stores[i]; } public void setStores(Store stores, int i) { this.stores[i] = stores; } }//Driver.javapublic class Driver { public static void main(String[] args) { }} What kind of development is essential for your country? Write in six points. Write the expression as a single function of alpha. cos(180-alpha) Most executive information systems include a _____, which integrates information from multiple sources and presents it in a unified, understandable format, often as charts and graphs.a. digital dashboardb. decision support system databasec. model based. decision support system engine How do you know if a radical can be simplified? Explain. Read each the sentence carefully. If a comma is needed, rewrite (type) the sentence and addthe comma in the correct spot. If the sentence is correct, write correct.Before leaving class the student checked his bag for books. Write in point-slope form, slope-intercept form, and standard form an equation that passes through (-1,2) with slope 4. The diameter of a circle is inches what is the area? Create a system of linear equations with one solution. In your final answer, include the system of equations and the graphs of the lines. If the exchange rate for Canadian and U.S. dollars is 0.92777 to 1, this implies that 13 Canadian dollars will buy ____ worth of U.S. dollars. (Select the nearest answer.) Zack was injured in a mining accident and suffered brain damage. In time his brain healed and he was able to go back to work. The only noticeable consequence from the accident was his personality. Zach went from a mild-mannered and calm man to a highly aggressive and temperamental individual. Given this information, the region of the cerebral cortex that was most likely damaged in the accident was the _______ lobe. Imagine using brainly LOL COULDNT BE ME XD