C# Which is read-only property? Question 6 options: public Circle() { _diameter=0.0; } public double Radius { get { return _diameter/2; } set { _diameter = value; } } public double Radius { get { return _diameter/2;} } public double Radius { set { _diameter = value; } }
Q: In the context of the development of computer systems, it is important to make a distinction between…
A: Introduction The advantages and disadvantages of using agile methods to design systems. Every…
Q: The benefits of an IaaS approach compared to locally hosted servers.
A: The charity management maintains the charity information infrastructure utilising the infrastructure…
Q: Do you monitor employee performance?
A: An employee is a person or organization that compensates them for their labor. To be considered…
Q: ain the most probable cause of my PC's slow startup. I'd ap
A: Introduction: The memory of the computer still holds active programmes that were loaded during…
Q: What does a high-priority firewall system do? How do you use packet filtering software properly?
A: High Priority firewall system: A firewall is a network security device which monitors both incoming…
Q: What are the motivations for breaking down programs into modules and translating source codes into…
A: Definition: In response to your query A software design known as a "modular layout" places an…
Q: If a user calls the help desk and says, "My machine won't start," a competent technician should…
A: When a user calls the help desk and reports that their machine won't start, a competent technician…
Q: What are the four most typical reasons of database failure, and how do you intend to handle them to…
A: Answer is
Q: How can Model View Controller (MVC) help structure web applications? Why could the end-user like MVC…
A: Model-View-Controller (MVC) is a software design pattern used to separate an application's data…
Q: Local computations are possible with an intelligent terminal.
A: According to the inquiry, Personal computers may use terminal simulation software that mimics the…
Q: Please explain the distinction between network architecture and application architecture.
A: Network architecture and application architecture are two different types of architecture that are…
Q: Maintain a clear distinction between control and status registers, as well as user-visible…
A: An operational framework is a piece of software that facilitates communication between the user and…
Q: Use SQL to complete the following exercises. Provide SQL screenshots of the results of both…
A: SQL commands are instructions used to communicate with a database to perform tasks, functions, and…
Q: Being a global virtual company, GM faces several ethical issues. Richard Mason discovered four.…
A: The ethics of information in a variety of fields Information ethics may be broken down into four…
Q: C++ pls (use only while-loop. using for-loop will not get any credit.) Ask user how many grades you…
A: Algorithm: Step 1 Start. Step 2 Declare integer variable num_grades, double variable grade, and…
Q: When is a graph a tree? Write a program that will read from a file specified on the command line and…
A: The main difference between a graph and a tree is that the tree doesn't have any cycle in it whereas…
Q: A stack, global register, or single accumulator are Processor architectures. Each one balances pros…
A: In this question we have to understand on the detail that stack, global register, or single…
Q: Is there any distinction between a disguised ROM and a one-time password (OTP)?
A: One-Time Password (OTP) and Disguised ROM are two significant technologies utilized in modern…
Q: How can a foreign key ensure the reliability of a database? Please provide the reasoning for your…
A: Introduction: Foreign keys are an important component of relational databases because they maintain…
Q: Does symmetric and asymmetric key cryptography differ?
A: Yes, symmetric and asymmetric key cryptography differ in several important ways. Symmetric key…
Q: What's digital audio? analog-to-digital conversion.
A: Sound is simulated and transmitted via the use of digital audio. As a result, digital audio relies…
Q: What's a firewall's main job?
A: Note: As per guidelines, we can solve only one question at a time. Hence resubmit the question foe…
Q: How are solid-state disks (SSDs) in business PCs different from those in laptops?
A: In this question we have to understand how are solid-state disks (SSDs) in business PCs different…
Q: What separates computer ethics, IP, copyright, and patent in the business context?
A: The study of what is morally right or wrong, just or unjust, falls under the purview of ethics,…
Q: "Ethics"-what does it mean? Rights and freedoms-positive and negative rights can they ever conflict?
A: The answer is given in the below step
Q: What does "Access Point" imply for WiFi? Have you considered future steps?
A: A wireless access point (wireless AP) is a network device that connects a fixed wire network and a…
Q: There are many different methods in which one may define a system model. What kinds of things have…
A: Introduction: The process of creating a system model involves developing a representation of a…
Q: Methods of analyzing systems, both old and new, are analyzed and compared in terms of their…
A: Traditional methods:– Interviewing and Listening Interviews are one of the traditional methods…
Q: What precisely is intended by the phrase "Infrastructure as a Service" (also written as…
A: INTRODUCTION: Cloud computing, or "infrastructure as a service," is a model in which data center…
Q: Ask about business social media accounts. How are they different? Internet recruiting services are…
A: Studies on Social Media Online: Often referred to as "social media platforms," online social…
Q: What are some examples of successful collaboration between software developers and their end users?
A: Successful collaboration between software developers and end users is essential for creating…
Q: Even though my laptop's BIOS has been upgraded, there is no display. What may be the issue?
A: Introduction: BIOS stands for Basic Input/Output System. It is a type of firmware located on a…
Q: Unfortunately, this is the case because modern computers are so powerful. What evidence can we…
A: Computer system:- A computer system is an integrated set of components that work together to perform…
Q: While discussing data, what are the potential legal repercussions of the issues raised?
A: Introduction The world today runs on data, and as such, data has become a valuable asset for…
Q: What are the primary distinctions that exist between possessing the copyright to use software and…
A: Copyright ownership It is the legal right of the creator as well as owner of an original work, also…
Q: Write the steps to submit any online submission form
A: Access the submission form: Locate the website or online platform where the submission form is…
Q: In the twenty-first century, why are packet and circuit switches still used, an which kind of switch…
A: Please find the answer in next step
Q: In comparison to a relational database, what benefits does a document storage offer?
A: In this question we need to explain the benefits which document storage offer in comparison to a…
Q: Modern corporations use which firewall construction style? Why? Explain.
A: Modern corporations use a variety of firewall construction styles depending on their specific…
Q: What are some signs a laptop's operating system has been corrupted?
A: Warning signs that a laptop's OS has been tampered with include: Often at random, these pop-ups will…
Q: How can a hash table improve efficiency over a linear list? Problem?
A: Answer: Both the hash table structure and the linear list structure are used as data formats for…
Q: ROM and RAM make up a PC's main memory.
A: A personal computer's main memory comprises two types of storage: read-only memory (ROM) and…
Q: How does the foreign key contribute to the security of a database? Do you want to do this for a…
A: Foreign key: A relational database foreign key links data from two relations. It links two relations…
Q: The following is a concise summary of the three-sphere systems management paradigm. Is there any way…
A: System Management: The three-sphere system management approach addresses the business,…
Q: There are several options for storing information in React Native. How about we talk about your top…
A: There are so many options for storing information in React native we have to describe Three choices…
Q: How would you arrange Who, What, Where, and When data to find underlying causes? Why these…
A: STRATIFICATION: Stratification classifies data, people, and things into separate groups or levels.…
Q: I was wondering if you knew of any specific cases where virtual servers were employed in a school…
A: A virtual server, also known as a virtual machine (VM), is a software implementation of a physical…
Q: Interprocessor communication is needed to recognise multiprocessor systems.
A: Yes, interprocessor communication is typically needed to recognize and effectively utilize…
Q: Provide a description of "firewall" in terms of network security, describe how it is applied to…
A: Answer is
Q: Select the appropriate expression to describe the output of a computer that is written directly to…
A: computer output that is written directly to optical storage rather than paper or microfiche is…
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:
C#
Question 6 options:
|
public Circle() |
|
public double Radius |
|
public double Radius |
|
public double Radius |
- We need to choose the read-only property from the options available.
Step by step
Solved in 3 steps
- Incorrect Question 6 public class Shape { Color fillColor; } public Shape() { fill Color = Color. RED; } } public Shape(Color fillColor) { this.fill Color = fillColor; } public class Circle extends Shape { int radius; public Circle() { radius = 1; } public Circle(int radius) { this.radius = radius; } public Circle(int radius, Color fillColor) { } super(fillColor); this.radius = radius; Circle c1= new Circle(); Circle c2= new Circle(5); Circle c3 = new Circle(10, Color.BLUE); Which of the following are correct? c2 has radius 5 c1 is red c2 is red c3 has radius 10 c3 has radius 1 c3 is red c1 is blue ✔c2 has radius 10 c3 is blue c1 has radius 5 c1 has radius 1 c2 has radius 1 c2 is bluepython Cylinder class: Instance variables: Make instance variables appropriately to accomplish the tasks you need. Methods: ?_init_ :: constructor, initializes instance variables o Additional Parameters: diameter and height (in that order) o Assumption: diameter and height will always be numbers which represent measurements in millimeters o Temporary Assumption (we will fix this later): diameter will never be negative and height wilI always be positive number above o ? get_volume : returns the volume of the cylinder based on its height o Additional Parameters: No additional parameters (just self). .0 Note: Use pi from the math module ?_str__ :: returns string representation with this format: "Cylinder (radius: 20.25mm, thickness: 6.10mm, volume: 7858.32mm^3)" o Additional Parameters: No additional parameters. o Notes: ? The quotes in the example are just our string boundaries! The first character in the above example is C. ? This method reports the radius (NOT the diameter). ? All…public class Application { public static void main(String[] args) { Employee empl = new Employee(); empl.firstName = "Ali"; empl.lastName = "Omar"; empl.salary = 20000; Employee emp2 = new Employee(); emp2.firstName = "Mohamed"; emp2.lastName = "Nour"; emp2.salary = 30000; System.out.println("- System.out.printin("- empl.employeeSalary(); System.out.println("- empl.checkEmployeeSalary(emp1.salary, emp2.salary); System.out.printin("- System.out.println("- printEmployee(emp2); System.out.printin("- Employee employeeArr[] = new Employee[2]: employeeArr[0] = empl; employeeArr[1] = emp2; Application a = new Åpplication(); a.printArrayofEmployee(employeeArr); Non static (instance) start to call Static function to print ---------"); "); - Non Static function to print - --"); Non static (instance) start to call same class Static function to print --------); -"); Non Static function to print ----); System.out.println("- System.out.printin("- System.out.printin("Salary : " + Employee.salary);…
- public Account (double initialBalance){balance = initialBalance;}public Account () {balance = 0;}public void deposit (double amount){balance += amount; // Balance = balance + amount}public void withdraw (double amount){balance -= amount; // balance = balance - amount}public void close (){balance = 0;}public String toString(){return "balance: " + balance;}} Modify the Account class by adding two instance variables containing the customer's name and the account number. Both will be String objects. Modify the primary constructor for the Account class so that it takes three parameters: the balance, the customer's name, and the account number. Add instance methods named getCustomerName and getAccountNumber that return the customer name and account number.C# PROGRAMMING OOP1 - Objects, Classes, and Encapsulation Create a program that has the following method and corresponding usage. 1. PerimeterTriangle - compute the perimeter of a triangledesign patterns quetion public double calculatePerimeter(Shapes [] shapes) { double p = 0;for (Shape shape : shapes) { if (shape is Rectangle) { Rectangle rectangle = (Rectangle) shape; p += (rectangle.Width+rectangle.Height) * 2; } else { Circle circle = (Circle)shape; p += 2 * circle.Radius * Math.PI; } } return p; } which design principle is violated in the above code? what is the issue/ limitation of this code? rewrite the code to not violate the design principle you answered in part 1?
- class Main { publicstaticvoid main(String[] args) { // Coin myPenny = new Coin(CoinType.PENNY); // Coin myNickel = new Coin(CoinType.NICKEL); // Coin myDime = new Coin(CoinType.DIME); // Coin myQuarter = new Coin(CoinType.QUARTER); // Coin myHalfDollar = new Coin(CoinType.HALF_DOLLAR); // Coin myDollar = new Coin(CoinType.DOLLAR); // System.out.println(printValue(myPenny)); // System.out.println(printValue(myNickel)); // System.out.println(printValue(myDime)); // System.out.println(printValue(myQuarter)); // System.out.println(printValue(myHalfDollar)); // System.out.println(printValue(myDollar)); } publicstatic String printValue(Coin c){ String result = ""; // result = String.format("The value of a %s is $%.2f", c.getName(), c.getValue()); return result; } }Question 1 public class Flat { private int noOfRooms; private double area; private boolean seaView; public Flat() { noOfRooms = 3; area = 200; seaView = true; } %3D public void setFlat(int n, double a, boolean s) { noOfRooms = n; area = a; seaView = s; } public int getNoOfRooms( ) { return noOfRooms; } public double getArea( ) { return area; } public boolean getSeaView( ) { return seaView; } } Write a static method named findFlats that takes as a parameter an array of type Flat named list. The method should count and return the number of flats that have 3 or more rooms and with a sea view. The method prototype is: public static int findFlats (Flat[] list); Note: assume the array is already declared, populated with data in the main method and ready to be used.Computer Science c++ help comment code please. Complex has multiple parameters to overload i think. class Complex{public: Complex(); //There are no parameters because... Complex(double); //There is one parameter because... Complex(double, double);//There are two parameters because... double get_Real(); void set_Real(double); double get_Imaginary(); void set_Imaginary(double); friend ostream& operator << (ostream& out, Complex& r); //explain friend istream& operator >> (istream& in, Complex& r);//explainprivate: double real; double imaginary;}; ostream& operator << (ostream& out, Complex& r) //{ double a = r.get_Real(); double b = r.get_Imaginary(); if (a != 0)out << a; if (b < 0) out << "-" << abs(b) << "i"; if (b > 0 && b != 1) out << "+" << b << "i"; if (b == 0) out << "0"; if (b == 1 && a != 0) out << "+" <<…
- Public classTestMain { public static void main(String [ ] args) { Car myCar1, myCar2; Electric Car myElec1, myElec2; myCar1 = new Car( ); myCar2 = new Car("Ford", 1200, "Green"); myElec1 = new ElectricCar( ); myElec2 = new ElectricCar(15); } }object oriented programming using c++ class decleration: class MyPhoneBook{ string* names; string* phones; int phoneBookSize; public: MyPhoneBook(int); //Takes size MyPhoneBook(const MyPhoneBook&); //Copy Constructor bool addEntry(string ,string); bool displayEntryAtIndex(int); void displayEntryAtIndices(int*); void displayAll(); int* findByName(string); int* findByPhone(string); bool updateNameAt(string, int); bool updatePhoneAt(string, int); ~MyPhoneBook();};Microsoft Visual C#7th Edition, Joyce ISBN: 9781337102100 chap 5 case problem 5-2. This is my code but it's not working in Cenage Mindtap. What did I do wrong, please? Thank you using System; using static System.Console; using System.Globalization; class MarshallsRevenue { static void Main() { const int INTERIOR_PRICE = 500; const int EXTERIOR_PRICE = 750; string entryString; int numInterior; int numExterior; int revenueInterior; int revenueExterior; int total; bool isInteriorGreater; bool valid; valid = true; int monthnumber; int interiorRate; int exteriorRate; interiorRate = INTERIOR_PRICE; exteriorRate = EXTERIOR_PRICE; Write("Enter number of month being scheduled 1-12 >> "); entryString = ReadLine(); monthnumber = Convert.ToInt32(entryString); while ((monthnumber < 1) || (monthnumber > 12)) {…