Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please help me by showing me to make unit test Given the following class, write a unit test in the MovieSuite test suite for the

please help me by showing me to make unit test

image text in transcribed
Given the following class, write a unit test in the MovieSuite test suite for the add_rating (double) function. The add_rating (double) function adds a rating value to the rating member variable and increments the rating_count . Use the Google Test framework. You can assume that all other functions in the class are fully tested. class Movie { private: string title; double rating; int rating_count; public: Movie (string title); //sets title and initializes rating and rating_count to zero string get_title () ; double get_average_rating () ; //returns average rating (i.e. , rating / rating_count) void add rating (double) ; /* Your Unit Test Should Go Below */ Enter your answer here

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

Financial management theory and practice

Authors: Eugene F. Brigham and Michael C. Ehrhardt

12th Edition

978-0030243998, 30243998, 324422695, 978-0324422696

Students also viewed these Programming questions

Question

1. What is the money market?

Answered: 1 week ago