Movie Profit
Modify the Movie Data program written for
Want to see the full answer?
Check out a sample textbook solutionChapter 7 Solutions
Starting Out With C++: Early Objects (10th Edition)
Additional Engineering Textbook Solutions
Database Concepts (8th Edition)
Starting Out with C++ from Control Structures to Objects (9th Edition)
Starting Out With Visual Basic (8th Edition)
Web Development and Design Foundations with HTML5 (8th Edition)
Java How to Program, Early Objects (11th Edition) (Deitel: How to Program)
- Moving Between Rooms - Navigation In this assignment, you will be working with a given "rooms" dictionary and associated constants to create a simple text-based game. Your main task is to develop a function that allows the player to navigate through the rooms based on the given specifications. You need to implement the function found in the starter code to the right The function should take into account the following conditions: If the direction leads to an exit, set the next room to the exit and the message to "Goodbye". If the direction is invalid, set the next room to the current room and the message to "No such direction". If the direction is valid, but you cannot go that way, set the next room to the current room and the message to "You bumped into a wall". If the direction is valid and you can go that way, set the next room to the room in that direction and the message to "Empty". To help you understand how the function will be integrated into the gameplay loop, the following…arrow_forwardC++ OOP Create a struct Rectangle where a rectangle is defined by Length & Width. Each Rectanglehas an area and perimeter. You can also compare two rectangles with respect to the area.o The program should be able to calculate the perimeter () and the area () of therectangle, can set the value of length and width and retrieve the value of length &width.2. Create a struct Student where attributes associated with each student are his name,registration number, father name, degree and department. One can view the details of allstudents and can also search the details of any student by name.3. Make a struct Cylinder. Choose appropriate attributes. Code should be able to calculate:o Surface Area of Cylinder (Formula A = 2πr^2 + 2πrh = 2πr(r + h))o Volume of cylinder (Formula V = πr^2h)4. You are going to make an employee management system. In this lab, you have to create anEmployee class only. Employee class fields are: Employee Name, Employee ID, andEmployee Gender. The member…arrow_forwardText-based adventure game: Pretend you are creating a text-based adventure game. At different points in the game, you want the user to select to fight, run, or hide from certain enemies. Modify the application below (week3.py) so that the selection variable is sent as an argument into the choice() function. The user should enter 1 to fight, 2 to run, or 3 to hide in the main(). The choice() function should print one of the three options. You will need to add an if statement in the choice() function to make the correct selection.arrow_forward
- ll data members must be declared as private. Global variables are not allowed. Constants are ok. There should be no usage of cin or cout in the method or in the class definition or required functions. They should be handled using parameters and return values. cin and cout can and should be used in the testing functions. There should be only one “return” statement in a function or method. Multiple return statements within the same function/method are not allowed. Please pay attention to the required data types in the description. tuple, list and vector classes are not allowed to be used in this exam. Please write C++ functions, class and methods to answer the following questions. 1. Define a new C++ class named “Exam” that manages simple exam information: student id (integer) and a score (integer) The class must provide at least the following two methods: • isPassing which will return a boolean: true if the score is >=60 and false otherwise • toString method that returns the string…arrow_forwardQ1: Research Groups In response to popular demand, Dan’s established two research groups A and B composed of his n graduate students. Each of these students is a member of exactly one of the two groups at any given time. The students are numbered from 1 to n in some arbitrary order. To measure the success of his research groups, Dan assigns a citation score to each of them. Initially, both groups have citation score 0. Throughout the semester, events of the following two types happen: Student x publishes a paper in which they cite student y’s work (youcan assume all of the students have been around long enough to have prior research that can be cited). As a result, If x and y are in the same group, their group’s citation score increases by 1. If x and y are in different groups, y’s group’s citation score increases by 5. Dan changes student x’s group (from A to B or from B to A) to have them work on different projects. To assess the overall success of the research groups, Dan…arrow_forwardLanguage: C++ Subject: OOP Task:You have to write a program to store information of university students. There can be many students in university, so you can make a Student class and objects of class Student to store information. The university is interested in storing information about student’s name, enrollment, department, class, CGPA and gender. You can store this information as data member values for each object. But as you already know you cannot directly access data members of a class, so you need to make member functions to access data members. You can make as many member functions as you want. There are no restrictions. The University is interested in knowing the student’sname with highest CGPA in a specific class. For example if you entered information of 10 students from class BSIT 2 and information of 5 students from class BSIT 3, and it is asked to find name of student with highest CGPA in BSIT 2 then your program must be able to find details of highest CGPA student from…arrow_forward
- Basic Computer Programming ActivityLanguage: CShow the code and how it works thanksarrow_forwardArcGis Program Geographic Systems You have been assigned to create a map using a number of feature classes. Each feature class is projected in a different coordinate system. The accurate position of all the features is very important for this assignment. Therefore, you select a feature class and use it's coordinate system for the data frame. Then you should perform a(n) for each of the remaining feature classes.arrow_forwardUse Python Programming Language (The Stock class) Design a class named Stock to represent a company’s stock that contains: A private string data field named symbol for the stock’s symbol. A private string data field named name for the stock’s name. A private float data field named previousClosingPrice that stores the stock price for the previous day. A private float data field named currentPrice that stores the stock price for the current time. A constructor that creates a stock with the specified symbol, name, previous price, and current price. A get method for returning the stock name. A get method for returning the stock symbol. Get and set methods for getting/setting the stock’s previous price. Get and set methods for getting/setting the stock’s current price. A method named getChangePercent() that returns the percentage changed from previousClosingPrice to currentPrice. Write a test program that creates a Stock object with the stock symbol INTC, the name Inte lCorporation, the…arrow_forward
- case 3: res=31;break; case 4: res=30;break; case 5: res=31;break; #include int days_in_month(int month,int is_leap){ int res=-1; switch(month) { case 1: res=31;break; case 2: if(is_leap) res=29; else res=28;break; case 6: res=30;break; case 7: res=31;break; case case 11: res=30;break; case 12: res=31;break; } return res;} int main() { int m,l; printf("Enter month: "); scanf("%d",&m); printf("Enter 1 for leap year 0 for non leap: "); scanf("%d",&l); int days-days_in_month(m,1); printf("Days %d",days);} Write in c 8: res=31;break; case 9: res=30;break; case 10: res=31;break;arrow_forwardPasswords, again Learning objectives In this lab, you will practice: writing a function to match the specifications using string concatenation to generate a new return value writing your code a module Instructions Write a function create_password(pet_name, fav_number) that will return a password with the following pattern: : fav_number followed by the pet_name followed by the underscore and fav_number (see example below). Create a program that reads pet name and favorite number from the user, uses the function above, and uses the return value to output: Your new password is "3Angel_3". Example Input: Angel 3 Output: Your new password is "3Angel_3". Note: Your program must define and call the following function: def create_password(pet_name, fav_number) Please use the form if_nane_=='_main_' # Define your function here. if __name__ == '__main__': # Type your code here.arrow_forwardGiven the following code: match the data type with the variable. Some answer may be used more than once struct product Type int product Number: double cost: int numberInStock; }; int main (void) struct product Type toyCar; struct productType barbies [10]; struct product Type ploy stoyCar; ... the rest of the main is not shown &barbies[3] toycar.numberinStock pToy pToy-productNumber barbies ("pToy).cost toyCar cost مر barbies[0] 1. char 2. int 3. double: 4. array 5. productType 6. productType" 7. None listedarrow_forward
- Programming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:CengageC++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology PtrEBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENT