EBK STARTING OUT WITH VISUAL C#
4th Edition
ISBN: 9780134400433
Author: GADDIS
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Concept explainers
Textbook Question
Chapter 10, Problem 6MC
The refers to the base class.
- a. friend keyword
- b. this keyword
- c. base keyword
- d. class keyword
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Please include doctring, and write only in python:
First, write a class named Movie that has four data members: title, genre, director, and year. It should have:
an init method that takes as arguments the title, genre, director, and year (in that order) and assigns them to the data members. The year is an integer and the others are strings.
get methods for each of the data members (get_title, get_genre, get_director, and get_year).
Next write a class named StreamingService that has two data members: name and catalog. the catalog is a dictionary of Movies, with the titles as the keys and the Movie objects as the corresponding values (you can assume there aren't any Movies with the same title). The StreamingService class should have:
an init method that takes the name as an argument, and assigns it to the name data member. The catalog data member should be initialized to an empty dictionary.
get methods for each of the data members (get_name and get_catalog).
a method named add_movie…
I need help with the main function, please. I can't provide command-line arguments, I need an alternative
I have all classes I need I just need the main function
public float method1(int z) {
return (float) z;
}
// in another class we created an object of the first class and within in it:
int y = tester.method1();
are there any errors ? with explanation please
Chapter 10 Solutions
EBK STARTING OUT WITH VISUAL C#
Ch. 10.1 - In this section, we discussed base classes and...Ch. 10.1 - Prob. 10.2CPCh. 10.1 - What does a derived class inherit from its base...Ch. 10.1 - Look at the following code, which is the first...Ch. 10.1 - Briefly summarize the constructor issues in...Ch. 10.2 - Look at the following class definitions: class...Ch. 10.2 - Does the is a relationship work in reverse? Why or...Ch. 10.3 - What is the purpose of an abstract class?Ch. 10.3 - If a class is abstract, what cannot be done with...Ch. 10.3 - If a class is derived from a base class that has...
Ch. 10.3 - What must be done with an abstract property before...Ch. 10.3 - How can you create an abstract read-only property?Ch. 10 - When one object is a specialized version of...Ch. 10 - In an inheritance relationship, the_______ is the...Ch. 10 - In an inheritance relationship, the___________ is...Ch. 10 - Base classes are sometimes called____________. a....Ch. 10 - Derived classes are sometimes called______________...Ch. 10 - The refers to the base class. a. friend keyword b....Ch. 10 - Prob. 7MCCh. 10 - When a derived class method has the same name as a...Ch. 10 - The declares that a derived class is allowed to...Ch. 10 - The declares that this method overrides a method...Ch. 10 - A class that is not intended to be instantiated,...Ch. 10 - To declare a class as abstract, you use the...Ch. 10 - A regular, nonabstract class is sometimes called a...Ch. 10 - A(n) __________ is a method that appears in a base...Ch. 10 - A(n) __________ is a property that appears in a...Ch. 10 - __________ allows a base class reference variable...Ch. 10 - The base class inherits fields, properties, and...Ch. 10 - Polymorphism allows a class variable of the base...Ch. 10 - Properties in a base class cannot be overridden in...Ch. 10 - A base class reference variable can reference an...Ch. 10 - A statement that tries to use the new operator to...Ch. 10 - A class that is not intended to be instantiated,...Ch. 10 - When an abstract property appears in a class, it...Ch. 10 - What does a derived class inherit from its base...Ch. 10 - Look at the following code, which is the first...Ch. 10 - Can methods in the derived class directly access...Ch. 10 - When you create an instance of a derived class,...Ch. 10 - In what kind of situation would you want to use an...Ch. 10 - What is primary difference between an abstract...Ch. 10 - Can abstract classes also contain abstract...Ch. 10 - Write the first line of the definition for a...Ch. 10 - Look at the following class declarations: class...Ch. 10 - Write a parameterized constructor for a base class...Ch. 10 - Prob. 4AWCh. 10 - Create an abstract class called Star. Include an...Ch. 10 - Employee and ProductionWorker Classes Create an...Ch. 10 - ShiftSupervisor Class In a particular factory, a...Ch. 10 - TeamLeader Class In a particular factory, a team...Ch. 10 - Person and Customer Classes Design a class named...Ch. 10 - PreferredCustomer Class A retail store has a...
Additional Engineering Textbook Solutions
Find more solutions based on key concepts
What is the meaning of this directive? # include iostream
Problem Solving with C++ (9th Edition)
What is the superclass and what is the subclass in the following line? public class Pet extends Dog
Starting Out with Java: From Control Structures through Objects (6th Edition)
Suppose that you have a binary file that contains numbers whose type is either int or double. You dont know the...
Java: An Introduction to Problem Solving and Programming (8th Edition)
Give an example of a data constraint.
Database Concepts (8th Edition)
__________is information a program sends to the outside world.
Starting Out with C++ from Control Structures to Objects (8th Edition)
Assume that a program uses the named constant PI to represent the value 3.14. The program uses the named consta...
Starting Out with Java: From Control Structures through Data Structures (3rd Edition)
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- You are in process of writing a class definition for the class Book. It has three data attributes: book_title, book_author, and book_publisher. The data attributes should be private. In Python, write a setter/mutator method and a getter/accessor method for book_title(only) that will be part of your class definition. Note: You do not need to write the entire class definition. Just the two methods mentioned.arrow_forwardIn Python: Which of the following can be used to determine whether an object is an instance of a class? the isinstance function the in operator The is_object_of function The typeof functionarrow_forwardprivate float c; private void method2(double y) { c = y; } in another class we created an object of the first class then within in it : tester.method2 (10.0f); are there any errors ? how many errors if there are any and with explanation please.arrow_forward
- In Python, to make a variable inside a class private so that functions that are not methods of the class (such as main() ) cannot access it, you must _____________ write the word private then a space before the variable name write the word hide then a space before the variable name start the name of the variable with two underscores do nothing because Python variables declared inside a class are private by defaultarrow_forwardJava a. Fill in the blank to complete the definition of a class named Person (the class header) that has a public String field named name and a public integer field named age. _____________________________ public String name; public int age;} b. Fill in the blank to write the definition of a class named Stuff (the class header) that simply has a public String field named stuff. ___________________________ public String stuff;}arrow_forwardWhat are the names of the variables in a class? Group of answer choices G.I.Joe structure access members Those things we discussed in class...arrow_forward
- Suppose that you are in charge of customer service for a certain business. As phone calls come in, the name of the caller is recorded and eventually a service representative return the call and handles the request.Write a class ServiceRequests that keeps track of the names of callers. The class should have the following methodsarrow_forwardFind the syntax errors in the following class definition. Indicate the errors and state why there is an error.arrow_forwardprivate int b; public int method3() { return b; } // in another class an object of the first class was introduced and inside the second class : float y = tester.method3(); are there any errors ? and explain pleasearrow_forward
- I am not sure how to ask this question, but I need help in understanding the usage of :: when grabbing a member variable in a class? Rather than just typing that specific member variable instead? For Example: In Hpp file #include <iostream> using namespace std; class class_name{ void add_name(name); string variable_name; }; In CPP file: void add_name(string name){ class_name::variable_name = name; }arrow_forwardThe following code may, or may not, work. However the bigger issue is that it doesn't give good information to the end user. Assume that there is a Circle class, like we've defined in class before. Fix what problems you see, that could affect naming conventions, capitalization, and data output, and make sure the data output is clean for the end user. cout << "For Circle 1:" << endl; cout << c1.getArea() << endl; cout << c1.getx() << " " << c1.gety() << endl; cout << c1.getcolor() << endl; cout << endl << endl; This is the full question and it is c++arrow_forwardMake a class that represents an average of test scores. Make the class take an unlimited number of scores and calculate the number of tests taken along with the average. Class name: TestScores Fields: - name : String - totalScore : double - numScores : int Methods: + TestScores(name : String) + addTestScore(earned : double) : void + getNumTestsTaken() : int + getAverage() : double Write in java and use test case 1 as an referencearrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- EBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENTMicrosoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,Programming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:Cengage
- Programming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage Learning
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning
Introduction to Classes and Objects - Part 1 (Data Structures & Algorithms #3); Author: CS Dojo;https://www.youtube.com/watch?v=8yjkWGRlUmY;License: Standard YouTube License, CC-BY