Use an access specifier to make members of CPlusPlus cannot be accessed from outside the class. class CPlusPlus { [ Select] int n; 2 pts Question 6 Use an access specifier to make members of CPlusPlus accessible from outside the class. class CPlusPlus { public: int n;
Q: a. Consider each 3 consecutive digits in your ID as a key value. Using Open Hashing, insert items…
A: As per our guidelines, only 3 sub parts will be answered. So, please repost the remaining questions…
Q: Is word = 4 Nibble? Select one: a. Yes O b. No
A: Yes the word=4 Nibble. Explanation:- word and Nibble are the unit of information that are stored in…
Q: Type program language MATLAB to calculate the value of Y1, Y2 for n values and then draw it
A: % create the x1 and x2 x1 = 0 : 0.1 : 4; x2 = 0 : 0.1 : 4; % set y1 and y2 to given expression y1 =…
Q: Extreme programming expresses user requirements as stories, with each story written on a card.…
A: INTRODUCTION: Extreme Programming (XP) is an agile software development approach that attempts to…
Q: Consider delivering a series of packets from a sending host to a receiving host along a specified…
A: Introduction: Delays in processing, transmission, and propagation are all constant. The time it…
Q: If we change the implementation of any layer in the TCP / IP model then the implementation of other…
A: The answer is
Q: Assume array x [ ][ ] = { {1,2,3}, {4,5,6} }; x[0][1]= _____ ? this is on java
A: An array is a collection of multiple elements of the same data type.
Q: Analyze and discuss the performance (in Big-O notation) of implementing the following methods over…
A: To add to start of the singly linked list time complexity is O(1) because there will be no need to…
Q: Compare and contrast the notion of abstraction using examples from the area of computer science.…
A: Our task: The issue addresses the significance of abstraction in software engineering and the…
Q: Consider software quality from the standpoint of software flaws. What strategies/techniques would…
A: A software engineer is responsible for implementing various quality control measures in the…
Q: Inform readers about the technology used by Web servers to build personalised Web pages that adapt…
A: Intro Client-side scripting is a type of scripting that is run by web browsers. It's used when all…
Q: 2. Write down De Morgan's laws for quantifiers.
A:
Q: In software engineering, there are several data kinds. Discuss the differences between simple and…
A: Introduction: In software engineering, there are several data kinds. Discuss the differences between…
Q: Is there a diverse selection of cloud computing services that a person may utilize?
A: The cloud allows access to many communication tools through a network, such as emails and calendars.…
Q: How many constructors are there in Java?
A: Types of constructor in java.
Q: Define and write a boolean function isAnagram(s1,s2) that checks whether two words (s1 and s2) are…
A: def isAnagram(s1, s2): found = 0 notFound = 0 lenOne = len(s1) lenTwo = len(s2)…
Q: How would you describe the value of a data model to a database architect?
A: Architecture: In networking, architecture refers to the technology used, as well as the protocols…
Q: What are the advantages of using Lee's method for Routing? Think about it from the perspective of a…
A: Given: Lee's algorithm prioritizes breadth. Queue stores the steps. Four stages are typical. 1. Add…
Q: Explain how you perceive the term "software crisis" as it applies to current software engineering…
A: Software crisis: The problem of producing usable and practical computer applications within the…
Q: Which kind of intellectual property protects writing?
A: The IP Code modernized and consolidated the country's laws on patents, trademarks, and copyright in…
Q: Consider delivering a series of packets from a sending host to a receiving host along a specified…
A: Delays in processing, transmission, and propagation are all constant. The time it takes to transfer…
Q: What are the most critical requirements for integrating the cloud?
A: Introduction: Integration of cloud-based apps, systems, repositories, and IT environments allows…
Q: Explain why read-only memory (ROM) is needed and what function it plays in the design of a computer…
A: Given: Explain why read-only memory (ROM) is needed and what function it plays in designing a…
Q: Students, I'd want to use this opportunity to wish you You've studied a variety of black box testing…
A: Given: Greetings, Students! You've learned about numerous black box testing approaches including…
Q: What do you think about today's wireless networks in developing countries? LANs and physical…
A: The term "wireless network" refers to a computer network that establishes connections between nodes…
Q: Kindly write example and explain how they are used: 1. AFFINITY DIAGRAM 2. FLOW CHART
A: Introduction: The process of thinking about the tasks necessary to accomplish a desired objective is…
Q: On Windows, what is the definition of a scripting language? (Select all of the options that apply.)…
A: Scripting languages are the programming languages that helps us automating few tasks or processes…
Q: List the reasons why a company would need firewalls to protect its physical assets.
A: We need to list reasons why a company would need firewalls to protect it's physical assets.
Q: What is the objective of software development? Do you believe adding four additional qualities to…
A: Software creation: It is a set of computer science activities dealing with software development,…
Q: lated al pitages. play SATURATED (greater than 5V) and CUTOFF (less than 5V). Use the UML diagram as…
A: VoltTester.java: class Testers{int voltArray[]= new int[10];int voltActive;int voltSaturted;int…
Q: Explain the use of java characters and strings.
A: Intro java Characters - When working with characters, we usually utilize the primitive data type…
Q: Defintion of roundoff mistake
A: The difference between a number's determined approximation and its exact mathematical value is known…
Q: Below an adjacency list representation of an undirected graph where there are no weights assigned to…
A: We can represent a graph in many ways like adjacency list, adjacency matrix and incidence matrix.
Q: Why is it so difficult to understand cloud scalability? Is there a formula for how cloud computing…
A: Introduction: Cloud scalability benefits businesses and organizations who have been concerned about…
Q: What exactly is a central processing unit (
A: A central processing unit (CPU), also called a central processor, core processor or processor,…
Q: The term "personal computer" should be defined.
A: Intro Personal computers, PC, or, just plain PC, are the most widely used type of computer in the…
Q: Do you know any good firewall administration practices? Explain.
A: Firewalls: Firewalls act as a barrier, preventing traffic from entering that is intended to…
Q: Discuss briefly why using software engineering principles and techniques for designing software…
A: The Beginning: Since software systems were designed for personal use, using software engineering…
Q: Why is that Data Privacy Act is important?
A: The solution to the given question is: Ṭhe Data Privacy act is important because it provided…
Q: interrupt, There are 3 major methods that can be used of allocating disk space; one is contiguous…
A: The Answer start from step-2.
Q: Wireless networks have a less bandwidth capacity than conventional networks.
A: When transmitting a signal, bandwidth is the frequency spread within a specific frequency band.…
Q: Demonstrate how to create native authentication and authorization services in situations when a web…
A: Please find the detailed explanation in the following steps.
Q: Explain two computer breakthroughs that have contributed to improve e-commerce efficiency.
A: two computer technologies that has improved E-commerce are; 1.CHATBOTS 2.Voice Assistants
Q: When using the waterfall approach, the number of iterations is often limited, so why is this?
A: Given: A software development sequence or linear method is used in the waterfall process. The…
Q: een computer programm
A: Solution - In the given question, we have to Distinguish between computer programming and…
Q: device has a . programmable AND array and fixed .connections for the OR array
A: THE SOLUTION IS BELOW STEP
Q: hen it comes to data mining, why may analysts choose EDA over hypothesis testing?
A: EDA: It is the process of analyzing a dataset to detect patterns and outliers and produce hypotheses…
Q: Explain why read-only memory (ROM) is needed and what function it plays in the design of a computer…
A: here in the question ask for what is ROM and why it is needed and ,what type of data it stores. i…
Q: User assistance is provided through the session, presentation, and application levels. How?
A: Required: The user support layers are the session, presentation, and application layers. How?
Q: What does the term "processor" mean?
A: INTRODUCTION: The logic equipment that responds to and executes the basic instructions that operate…
OOPs
In today's technology-driven world, computer programming skills are in high demand. The object-oriented programming (OOP) approach is very much useful while designing and maintaining software programs. Object-oriented programming (OOP) is a basic programming paradigm that almost every developer has used at some stage in their career.
Constructor
The easiest way to think of a constructor in object-oriented programming (OOP) languages is:
Trending now
This is a popular solution!
Step by step
Solved in 3 steps
- public class Aircraft { // instance vairables private String aircraftName; private String regNumber; private String manufacturer; privateintmaxRange; privateintcrewSize; private LocalDate yearPutInService; privateintmaxServiceWeight; privateintnumberOfPassengers; privateintcurrentAirMiles; private LocalDate lastMaintenanceDate; privateintlastMaintenanceMiles; /** * Default Constructor * * @param lastMaintenanceMiles * @param lastMaintenanceDate * @param totalMiles * @param model * @param manufacturer * @param regNumber * @param vehicleType */ public Aircraft(String aircraftName, String regNumber, String manufacturer, intmaxRange, intcrewSize, LocalDate yearPutInService, int maxServiceWeight, int numberOfPassengers, int currentAirMiles, LocalDate lastMaintenanceDate, int lastMaintenanceMiles) { { this.aircraftName = aircraftName; this.regNumber = regNumber; this.manufacturer = manufacturer; this.maxRange = maxRange; this.crewSize = crewSize; this.yearPutInService = yearPutInService;…Parent Class: Food Write a parent class called Food. A food is described by a name, the number of grams of sugar (as a whole number), and the number of grams of sodium (as a whole number). Core Class Components For the Food class, write: the complete class header the instance data variables a constructor that sets the instance data variables based on parameters getters and setters; use validity checking on the parameters where appropriate a toString method that returns a text representation of a Food object that includes all three characteristics of the food Class-Specific Method Write a method that calculates what percent of the daily recommended amount of sugar is contained in a food. The daily recommended amount might change, so the method takes in the daily allowance and then calculates the percentage. For example, let's say a food had 6 grams of sugar. If the daily allowance was 24 grams, the percent would be 0.25. For that same food, if the daily allowance was 36 grams, the…open class Person() { open fun displayAge (age: Int) { println("My actual age is $age.") } } class Girl: Person() { override fun displayAge() { // calling function of base class super.displayAge( ) println("My fake age is ${age - 5}.") T } fun main(args: Array) { girl.displayAge(31) } 'displayAge' overrides nothing No value passed for parameter 'age' Unresolved reference: age Unresolved reference: girl
- Parking Ticket SimulatorFor this assignment you will design a set of classes that work together to simulate apolice officer issuing a parking ticket. The classes you should design are:• The Parkedcar Class: This class should simulate a parked car. The class's respon-sibilities are:To know the car's make, model, color, license number, and the number of min-utes that the car has been parkedThe BarkingMeter Class: This class should simulate a parking meter. The class'sonly responsibility is:- To know the number of minutes of parking time that has been purchased• The ParkingTicket Class: This class should simulate a parking ticket. The class'sresponsibilities areTo report the make, model, color, and license number of the illegally parked carTo report the amount of the fine, which is $2S for the first hour or part of anhour that the car is illegally parked, plus $10 for every additional hour or part ofan hour that the car is illegally parkedTo report the name and badge number of the police…class City(object): county = "Lake" population = 3000000 def -_init__(self, name, state): self.name = name self.state = state def region(self): return "Midwest" a) create an instance of this object, called X, for Chicago, Illinois b) return the population of the instance X c) change the county of the instance X from Lake to Cook d) return the name of the state of the instance X d) call the method region() on the instance Xis the term used to describe the process of making an instance of one class a member of another.
- class IndexItem { public: virtual int count() = 0; virtual void display()= 0; };class Book : public IndexItem { private: string title; string author; public: Book(string title, string author): title(title), author(author){} virtual int count(){ return 1; } virtual void display(){ /* YOU DO NOT NEED TO IMPLEMENT THIS FUNCTION */ } };class Category: public IndexItem { private: /* fill in the private member variables for the Category class below */ ? int count; public: Category(string name, string code): name(name), code(code){} /* Implement the count function below. Consider the use of the function as depicted in main() */ ? /* Implement the add function which fills the category with contents below. Consider the use of the function as depicted in main() */ ? virtualvoiddisplay(){ /* YOU DO NOT NEED TO IMPLEMENT THIS FUNCTION */ } };Child Class: Vegetable Write a child class called Vegetable. A vegetable is described by a name, the number of grams of sugar (as a whole number), the number of grams of sodium (as a whole number), and whether or not the vegetable is a starch. Core Class Components For the Vegetable class, write: the complete class header the instance data variables a constructor that sets the instance data variables based on parameters getters and setters; use instance data variables where appropriate a toString method that returns a text representation of a Vegetable object that includes all four characteristics of the vegetableJavaemployee and production worker classes write an employee class that keeps data attributes for the following pieces of information: • employee name • employee number next, write a class named productionworker that is a subclass of the employee class. the productionworker class should keep data attributes for the following information: • shift number (an integer, such as 1, 2, or 3) • hourly pay rate the workday is divided into two shifts: day and night. the shift attribute will hold an integer value representing the shift that the employee works. the day shift is shift 1 and the night shift is shift 2. write the appropriate accessor and mutator methods for each class. once you have written the classes, write a program that creates an object of the productionworker class and prompts the user to enter data for each of the object’s data attributes. store the data in the object, then use the object’s accessor methods to retrieve it and display it on the screen. satak overfallow
- add override display methodusing System; //base classclass Book{//data membersprivate string title;private string author;protected double price;//constructorpublic Book(string t, string a){title = t;author = a;price = 500;}//method to display detailspublic void display(){Console.WriteLine("Title:" + title + " author:" + author + " price:" + price);}} //child classclass PopularBooks : Book {//constructorpublic PopularBooks(string t, string a) :base(t,a) {price = 50000;}} class Program {static void Main() {//an array of 5 objectsBook[] B = new Book[5];//input title and authorfor(int i=0; i<5;i++){Console.Write("Input title: ");string name = Console.ReadLine();Console.Write("Input author name: ");string author = Console.ReadLine();//if author is popular,//call constructor of sub classif (author.Equals("Khaled Hosseini") || author.Equals("Oscar Wilde") || author.Equals("Rembrandt")){B[i] = new PopularBooks(name, author);}//call base class constructorelse B[i] = new Book(name,…6. class PPP int H: protected : int S; public : void input (int); void out (); }; class Q0Q : private PPP int T; protected : int U; public : void indata (int, int); void outdata (); }; class RRR : public Q0Q int M; public : void disp (); }; int main () 002 objl; RRR obj2; return 0; a. In the above code, is the member function out() accessible by obj1? b. Name the member function(s), which can be accessed from the obj2? c. Name the data member(s) that can be accessed from function disp().Part 1 Java Create a UML class diagram for the Circle class as described below: radius: a double PI: a final double initialized with the value 3.14159 The class should have the following methods: a constructor that takes the radius of the circle getRadius – An accessor (getter) for the radius setRadius - A mutator (setter) method for the radius calculateArea - Returns the area of the circle, which is calculated as: area = PI * radius * radius calculateDiameter - Returns the diameter of the circle, which is calculated as: diameter = radius * 2 calculateCircumference - Returns the circumference of the circle, which is calculated as: circumference = 2 * PI * radius Create test data for several different Circle objects and calculate the expected results of calling the various methods. Input Expected Results radius Area Diameter Circumference