Microsoft Visual C#
7th Edition
ISBN: 9781337102100
Author: Joyce, Farrell.
Publisher: Cengage Learning,
expand_more
expand_more
format_list_bulleted
Concept explainers
Textbook Question
Chapter 1, Problem 7RQ
The technique of packaging an object’s attributes into a cohesive unit that can be used as an undivided entity is ____________.
a. inheritance
b. encapsulation
c. polymorphism
d. interfacing
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
You will define three objects class Person, BookAuthor, and Book.
Class Person involves a person's identity.
Class BookAuthor involves a collection of books or book titles.
Class Book involves the number of books in stock , book title and price.
Design the three classes:
The classes must use an appropriate inheritance relationship. Each class must have a constructor. Each class has at least two private data members and you must include accessors. You must test your classes by creating a BookAuthor object and printing the Person, Book and BookAuthor values from a function you create inside of BookAuthor. Make sure you use the book object correctly and put it inside of BookAuthor.
in pytgi
USE TEMPLATE PROVIDED AT END OF QUESTION WHILE MAKING SOLUTION
-----------------------------------
Write a program to implement Hierarchical Inheritance
A class called Bill has the following protected data member variables
Datatype
Variable name
int
billNumber
string
name
Include the following member function in the Bill class
Member function
Description
void generateBill()
This function is used to display the bill number and customer name.
A class called TelePhoneBill inherits the class Bill with the following private data member variables
Datatype
Variable name
int
numberOfCallsMade
double
costPerCall
Include a 4 arguments constructor with the arguments in the order (int billNumber, string name, int numberOfCallsMade, double costPerCall).
Include the following member function in the TelePhoneBill class
Member function
Description
void display()
This function is used to display the telephone bill details
A class called CurrentBill inherits the…
For this assignment, you will use the Visual Studio Code (VS Code) IDE to compile and run a C# program.
Your application will demonstrate the use of inheritance by creating software classes that represent modes of transportation. Incorporate the following requirements into your application:
For all classes, provide the following
Documentation at the top of the class file that includes
Your name
Date of development
Description of the class
Class properties for each attribute listed with the class with public get and set accessors
Override of the ToString method to provide formatted string representation of the class properties
The main application must do the following
Print a line that states "Your Name - Week 1 Inheritance Performance Assessment"
Create an instance of each class using parameters of your choosing
Print each class's properties to the console using the ToString method
Print the following for your instance of the Car class using the get accessors (in this order):…
Chapter 1 Solutions
Microsoft Visual C#
Ch. 1 - Programming languages such as C#, Java, and Visual...Ch. 1 - Prob. 2RQCh. 1 - The grammar and spelling rules of a programming...Ch. 1 - Prob. 4RQCh. 1 - Programs in which you create and use objects that...Ch. 1 - Prob. 6RQCh. 1 - The technique of packaging an objects attributes...Ch. 1 - Of the following languages, which is least similar...Ch. 1 - Prob. 9RQCh. 1 - The C# method that produces a line of output on...
Ch. 1 - Prob. 11RQCh. 1 - Prob. 12RQCh. 1 - Prob. 13RQCh. 1 - Prob. 14RQCh. 1 - Prob. 15RQCh. 1 - Prob. 16RQCh. 1 - The text of a program you write is called...Ch. 1 - Prob. 18RQCh. 1 - Prob. 19RQCh. 1 - Prob. 20RQCh. 1 - Indicate whether each of the following C#...Ch. 1 - Name at least three attributes that might be...Ch. 1 - Prob. 3ECh. 1 - Prob. 4ECh. 1 - Prob. 5ECh. 1 - Prob. 6ECh. 1 - Prob. 7ECh. 1 - Write a program named BigLetter that displays a...Ch. 1 - From 1925 through 1963, Burma Shave advertising...Ch. 1 - Each of the following files in the Chapter.01...Ch. 1 - The case problems in this section introduce two...Ch. 1 - The case problems in this section introduce two...
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
- Strictly adhere to the Object-Oriented specifications given in the problem statement. All class names, member variable names, and function names should be the same as specified in the problem statement.The class Item has the following private member variables Data Type Variable Name string itemId string itemName string itemType string itemVendor Include appropriate setters and getters for the above class. Include the following constructors in the Item class Constructor Name Description Item( ) This default constructor used to initialize the itemType as “Electricals” and itemVendor as “Arun electricals” Item(string itemId,string itemName,string itemType,string itemVendor)…arrow_forwardFarrell, Joyce. Microsoft Visual C#: An Introduction to Object-Oriented Programming (p. 479). Kindle Edition. 9. Write a program named SalespersonDemo that instantiates objects using classes named RealEstateSalesperson and GirlScout. Demonstrate that each object can use a SalesSpeech() method appropriately. Also, use a MakeSale() method two or three times with each object, and display the final contents of each object’s data fields. First, create an abstract class named Salesperson. Fields include first and last names; the Salesperson constructor requires both these values. Include properties for the fields. Include a method that returns a string that holds the Salesperson’s full name—the first and last names separated by a space. Then perform the following tasks: • Create two child classes of Salesperson: RealEstateSalesperson and GirlScout. The RealEstateSalesperson class contains fields for total value sold in dollars and total commission earned (both of which are…arrow_forwardIn this exercise, you will design the class memberType. Each object of memberType can hold the name of a person, member ID, number of books bought, and amount spent. Include the member functions to perform the various operations on the objects of memberType—for example, modify, set, and show a person’s name. Similarly, up-date, modify, and show the number of books bought and the amount spent. Add the appropriate constructors. Write the definitions of the member functions of memberType. Write a program to test various operations of your class memberType.arrow_forward
- displays the entire anagram.cpp application. To indicate the phrase to be anagrammed, use a class. The class's member methods enable the phrase to be displayed, anagrammed, and rotated. The main() procedure receives a word from the user, constructs a word object with this word as an input, and uses the anagram() member function to anagram the word.arrow_forward1. IntroductionAn object-based application is an application that involves objects created out of classes. Theseobjects interact with each other to fulfill certain functionalities.The focus of this project is to develop an application written in java which involves the use ofobject oriented programming. This project is a group project. As a student you will be given achance to come up with an idea for your project. However, the project must satisfy thereequipments given in this document.This document shall be used as a set of guidelines. You are allowed to make necessary additionsand/or changes to the requirements with prior approval from your instructor.2. RequirementsPropose and implement an application, that contributes to solving a real life problem. Yourapplication should include at least the following:2.1 Classes3 to 4 classes each one of them should have:A. A number of private and public attributes. The private attributes (variables) will needcorresponding set/get methods.B. 2…arrow_forwardClass Student __init__(self, id: int, fist_name: str, last_name: str, town:str): """ This creates a student object with the specified ID first and last name and home town. This constructor should also create data structure for holding the students grades for all of there assignments. Additionally it should create a variable that holds the student's energy level which will be a number between 0 and 1. :param id: The student's identifiaction number :param fist_name: The student's first name :param last_name: The student's last name :param town: The student's home town """ get_id(self)->int: """ Returns the ID of the student as specified in the constructor. :return: The student's ID """ get_first_name(self) -> str: """ Returns the first name of the student. :return: The student's first name """ set_first_name(self, name:str): """ Changes the student first name to the specified value of the name parameter. :param name: The value that the first name of the student will equal. """…arrow_forward
- A class named CafeService contains • Two data members i.e. the orderID and the price of food item(s) served by • A no-argument constructor to initialize both data fields with default values of “ord#0”, 0.0• A parameterized constructor to initialize all data fields with user-defined valuesDerive a class named StaffService from the class CafeService that holds the following:• Two data members i.e. o serviceFee, o the cabinNumberto which the service has been made• A function named totalCharges that returns total cost of an order (including serviceFee + price of food item(s) served)• A parameterized constructor, which requires arguments for all of its own data fields as well as for the data fields of base class• A member function named display() to show all the details of an order including orderID,price, and totalChargesIn the main() function, instantiate an object of class StaffService object and test the implementation of both classes through this object.arrow_forwardWrite in C++ Language. (Employee Record): Create a class named 'Staff' having the following members: Data members - Id – Name - Phone number – Address - AgeIt also has a function named 'printSalary' which prints the salary of the staff.Two classes 'Employee' and 'Officer' inherits the 'Staff' class. The 'Employee' and 'Officer' classes have data members 'Top Skill' and 'department' respectively. Now, assign name, age, phone number, address and salary to an employee and a officer by making an object of both of these classes and print the same.arrow_forwardWrite a class named as vehicle which has some attributes this class has three functions.i.e.fuelAmount ()loadingCapacity()applyBrakes()enginePower()Write a class named as Bus, Car and Truck which are inherited from class Vehicle. Also write the setter/getter, default and parameterized constructor in each class. Write a main which create object of derived class and call all inherited function of base class.Note: Each class should have at least two attribute of base class.arrow_forward
- Chapter 15 Customer Employee Creator Create an object-oriented program that allows you to enter data for customers and employees. Each class will be stored in its own python file. Console Specifications Create a Person class that provides attributes for first name, last name, and email address. Include a parameter for each attribute in the constructor method. This class will provide a property or method that returns the person’s full name. Create a Customer class that inherits the Person class. This class must add an attribute for a customer Create an Employee class that inherits the Person class. This class must add an attribute for a social security number (SSN). Put the above three classes in a module named ‘company_objects’, separate from the application module. The program will create a Customer or Employee object from the data entered by the user and store the object in a single variable. Create a function that will display the Customer or Employee. The function will have a…arrow_forwardYou are implementing a console application in the context of your selected theme(Hotel Booking system). This application is composed by a console interface, exactly like class exercises and examples.Your application must meet the implementation requirements detailed below.1. Demonstrate your knowledge of classes, by implementing a problem domain with at least three classes. Your classes must have:a. At least one auto-implemented property;b. At least one fully-implemented property;c. At least one automatically-calculated property;d. At least one one-to-one relationship between them;e. At least one one-to-many relationship between them;f. Properties defined in a variety of data types;g. Exactly three constructor definitions;h. An overridden ToString method. C#arrow_forward*I am using the program mindtap Chapter 9 defined the struct studentType to implement the basic properties of a student. Define the class studentType with the same components as the struct studentType, and add member functions to manipulate the data members. (Note that the data members of the class studentType must be private.) Write a program to illustrate how to use the class studentType. Struct studentType: struct studentType { string firstName; string lastName; char courseGrade; int testScore; int programmingScore; double GPA; }; An example of the program is shown below: Name: Sara Spilner Grade: A Test score: 89 Programming score: 92 GPA: 3.57 ***************arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Microsoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,EBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENTProgramming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:Cengage
- C++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage Learning
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
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