Entries by Student

write my assignment 30879

Help! You will modify your implementation of “call_class”. The class will still manage a dynamic array of call records. Call this program “call_stats7.cpp”.

1. Implement friend function of a class;

2. Overload the  << as a friend function of a class with chaining;

3.Overload the – operator as a member function of a class with chaining;

#include <iostream>#include <string>#include <fstream>using namespace std;class call_record{public:string firstname;string lastname;string cell_number;int relays;int call_length;double net_cost;double tax_rate;double call_tax;double total_cost;};class call_class{public:call_class();~call_class(); //de-allocates all memory allocate to call_DB by operator new.bool is_empty(); //inline implementationbool is_full();//inline implementationint search(const string key);//returns location if item in listl; otherwise return -1void add( ); //adds a call record to call_DBcall_class & operator-(const string key); //removes an item from the listvoid double_size();void process();friend ostream & operator<<(ostream & out_to_file, call_class & Org); //prints all the elements in the //list to the screen.private:int count;int size;call_record *call_DB;};/************************************************************************************************************************************///Name: default constructor//Precondition: //Postcondition: //Decription: Reads the data file of call information (cell number, relays and call length) into the dynamic array of call record, //call_DB. If the count because equal to the size the function double_size is called and the memory allocated to call_DB is doubled./************************************************************************************************************************************/call_class::call_class(){}/***********************************************************************************************************************************///Name: is_empty//Precondition: //Postcondition: //Decription: returns true if call_DB is empty/**********************************************************************************************************************************/bool call_class::is_empty(){return count == 0;}/**********************************************************************************************************************************///Name: is_full //Precondition: //Postcondition: //Decription: returns true if call_DB is full/*********************************************************************************************************************************/bool call_class::is_full(){return count == size;}/**********************************************************************************************************************************///Name: search//Precondition: //Postcondition: //Decription: locates key in call_DB if it is there; otherwise -1 is returned/*********************************************************************************************************************************/int call_class::search(const string key){return -1;}/*********************************************************************************************************************************///Name: add//Precondition: //Postcondition: //Decription: adds the informaton for a call record to call_DB; if call_DB is full, double_size is called to increase the size of call_DB./********************************************************************************************************************************/void call_class::add( ){}/********************************************************************************************************************************///Name: operator-//Precondition: //Postcondition: //Decription: remove key from call_DB if it is there./*******************************************************************************************************************************/call_class & call_class::operator-(const string key){return *this;}/******************************************************************************************************************************///Name: double_size//Precondition: //Postcondition: //Decription: doubles the size (capacity) of call_DB/******************************************************************************************************************************/void call_class::double_size( ){size *=2;call_record *temp = new call_record[size];for(int i=0; i<count; i++){temp[i] = call_DB[i];}delete [ ] call_DB;call_DB = temp;}/******************************************************************************************************************************///Name: process//Precondition: //Postcondition: //Decription: calculate the net cost, tax rate, call tax and total cost for every call record in call_DB./*****************************************************************************************************************************/void call_class::process(){}/****************************************************************************************************************************///Name: operator<<//Precondition: //Postcondition: //Decription: Overloading operator<< as a friend function. Prints every field of every call_record in call_DB formatted to the screen and a file called “stats7_output.txt”./***************************************************************************************************************************/ostream & operator<<(ostream & out, call_class & Org){for(int i=0; i<Org.count; i++){out<<Org.call_DB[i].firstname<<” “<<Org.call_DB[i].lastname<<” “<<Org.call_DB[i].relays<<” “<<Org.call_DB[i].cell_number<<” “<<Org.call_DB[i].call_length<<endl;}//Put code to OPEN and CLOSE an ofstream and print to the file “stats7_output.txt”.return out; //must have this statement}/****************************************************************************************************************************///Name: destructor//Precondition: //Postcondition: //Decription: de-allocates all memory allocated to call_DB. This should be the last function to be called before the programis exited./***************************************************************************************************************************/call_class::~call_class(){}//driver to test the functionality of your class.int main(){cout<<“TEST1: Testing the Default Constructor, is_full and double_sizen”;call_class MyClass;cout<<“Finish TEST1: testing the default constructornnnn”;cout<<“Test2: Testing add, double_size, process, and is_full() n”;//MyClass.add();cout<<“Finish TEST2nnnn”;cout<<“Test3: Testing operator-, serach, and is_emptyn”;//MyClass – “5617278899” – “9546321555” – “1234567890”;cout<<“Finish TEST3nnnn”;cout<<“Test4: Testing operator<<nn”;cout<<MyClass<<endl;cout<<“Fist TEST4nnnn”;cout<<“The destructor will be called automaticallyn”;return 0;}

 

"Not answered?"


Get the Answer

write my assignment 20927

Assignment 3: The Multilayered and Decentralized System of US Law Enforcement

Many critics believe that federal law enforcement has encroached into the realm of local and state police responsibilities, particularly with regard to street crimes involving drugs, guns, and gangs. At the same time, some critics have argued for a more robust role for local law enforcement in combating terrorism and fighting illegal immigration—two areas historically thought to be the exclusive responsibility of the federal government.

On the basis of the assigned readings for this module, including the majority and minority opinions in U.S. v. Lopez (1995), and in light of your own views on government police power, write a 3- to 5-page essay addressing the following:

  • Differentiate the duties of federal, state, county and city law enforcement agencies.
  • Examine whether there are any particular law enforcement duties that should exclusively belong to federal law enforcement or the local police. Justify the reason for your choice.
  • Explain whether we should continue with the multiple layers of police agencies, some as small as a single officer, or whether there should be fewer agencies, like a regional police agency and a national police agency, to handle all aspects of law enforcement in the United States. Justify your answer with examples, showing why one approach is better than the other.

Be sure to support your positions with in-text citations and include a reference page in APA style.

Conduct an internet search of government and career sites (e.g. bls.gov, jobs.com, monster.com, etc) to locate recent information on the career prospects for Federal Law Enforcement Officers in your geographic location. Present your findings, including related job titles, potential employers, a summary of this job function, the education and experience required to qualify for this position, and the average salary one could expect to earn.

 

"Not answered?"


Get the Answer

write my assignment 948

Use the Internet to research the manner in which the Patient Protection and Affordability Care Act is designed to add value to the health care setting.

Answer following questions in own words site reference. Dont plagiarize. 

argue the importance of value-added patient services in health care organizations. Support your response with two to three (2-3) examples of value-added patient services that health care providers can offer to patients.

  • hypothesize the long-term impact of the Affordable Care Act on children’s overall health in the U.S. Support your response with at least two (2) examples of said impact.

 

"Not answered?"


Get the Answer

write my assignment 23737

Complete 16 page APA formatted essay: Matrix Factorization Techniques for Recommendation Systems (Netflix Prize).

We will also describe an incremental variant of the MF that effectively undertakes new users and rating that is fundamental within the real life recommender system. A hybrid MF-neighbor based method is further discussed in regard to advancing the prevailing performance of the MF. The proposed methods are mainly examined on the Netflix Prize dataset and mainly depict that they can be accomplish very favorable Quiz RMSE, which is the best sole method :0.8904, combination: 0.8841 and corresponding running time.

The Netflix Prize competition of 2006 showed that the Matrix Factorization techniques are greater to archetypal closest-neighbour techniques in the production of product recommendations and lets the inclusion of extra material like inherent feedbacks, self-assurance levels and chronological effects. There are floods of choices for contemporary consumers. Electronic dealers and content suppliers offer a vast choice of products with exceptional openings to meet a range of distinct needs and preferences. As a trend observed of late, more retailers have had an exponential positive change in interest to many purchasers with the most fitting products which is vital in the enhancement of user content and loyalty. In so doing, it evaluates trends of customer interests to offer rather custom-made recommendations which are in accordance to customer preference (Ricci, 124-198). Netflix, an e-commerce leader has recommender structures as prominent fragments of its website that are observantly beneficial for music, movies and TV shows. Quite a huge number of users will check a similar movie while each and every one of the users views various dissimilar movies. These users have shown the will to indicate their satisfaction levels with specific movies and thus a massive volume of data is available about what particular movies charm which users. Various known corporations analyze the available information to provide a recommendation on movies particular to

 

"Not answered?"


Get the Answer