Design and implement a class to model a battery

Assignment Help Computer Engineering
Reference no: EM132095898

Please help Design and implement a class to model a battery.

A battery object should know its voltage, how much energy it is capable of storing, and how much energy it is currently storing (in joules).

Include the following member functions. powerDevice:

Given the current of an electrical device (amps) and the time the device is to be powered by the battery (seconds), this function determines whether the battery's energy reserve is adequate to power the device.

If so, the function updates its energy reserve by subtracting the energy consumed and returns the value true.

Otherwise it returns the value false and leaves the energy reserve unchanged. maxTime:

Given the current of an electrical device, the function returns the number of seconds the battery can operate the device before it is fully discharged.

This function does not modify the energy reserve. reCharge: This function sets the battery's component representing the present energy reserve to its maximum capacity.

Use the following equations in your design. p=vi p= power in watts (W) v= voltage in volts (V) w=pt i= current in amos (A) w= energy in joules (J) t= time in seconds (s) For this simulation, neglect any loss of energy in the transfer from battery to device.

Create a main function that tests your class by creating an object to model a 12-V automobile battery with a maximum energy storage of 5x10^6 J.

Use the battery to power a 4-A light for 15 minutes. Then find out how long the battery's remaining energy could power an 8-A device. After recharging the battery, ask again how long it could operate an 8-A device. program is in C++.

Reference no: EM132095898

Questions Cloud

Contrast automated vs manual policy enforcement : Contrast automated vs. manual policy enforcement controls in Policy Enforcement
Design and implement a class quadratic for a function : Design and implement a class quadratic to represent a quadratic function, a function of the form f(x) = ax^2 +bx +c .
What is the importance of organizational culture : What is the importance of organizational culture, what it impacts in the workplace, and how it shapes an organization ethic
Business plan to encourage potential investors : What are the elements that should be added to a business plan to encourage potential investors?
Design and implement a class to model a battery : A battery object should know its voltage, how much energy it is capable of storing, and how much energy it is currently storing (in joules).
What would be some key pieces of information : What would be some key pieces of information I need to know before forming a nonprofit organization in my community?
Tactical plan for human resources department : The Human Resource department is tasked with securing interns, recruiting and training volunteers, and overseeing all aspects of hiring and acclimation.
Long-term capacity management strategies : Are there any economical issues involved when it comes to long-term capacity management strategies?
Define the matrix as a square matrix : Define the matrix as a square matrix based on the number of points, also keep an array of the labels.

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