A class design requires that a member variable cannot be accessible directly outside the class. Which modifier should be used to obtain the access control?()    A、 publicB、 no modifierC、 protectedD、 private

A class design requires that a member variable cannot be accessible directly outside the class. Which modifier should be used to obtain the access control?()    

  • A、 public
  • B、 no modifier
  • C、 protected
  • D、 private

相关考题:

A class design requires that a member variable should be accessible only by same package, which modifer word should be used? A.protectedB.publicC.no modiferD.private

A passenger plane is able to carry a fixed weight, including passengers and fuel.Which wing design would be best for such a plane?A.Design 1B.Design 2C.Design 3D.Design 4

Traditional structured analysis techniques focus upon the flow of(1)within a system. Object-oriented analysis emphasizes the building of real-world models, It examines requirements from the perspective of the classes and objects found in the vocabulary of the(2)domain.Traditional system design method emphasizes the proper and effective structure of a complex system. Object-oriented design method encompasses the process of object- oriented decomposition and a(3)for depicting both logical and physical as well as static and dynamic models of the system under design.Object-oriented programming is a method of implementation in which programs are organized as cooperative collections of objects, each of which represents an(4)of some class, and whose classes are all members of a hierarchy of classes united via(5)relationships.A.controlB.programC.dataD.reference

Exhibit:You are creating a composite control for capturing user address information in a Web application. You define a number of properties that the user can set at design time. You need to group these properties in the Properties dialog box. In addition, you need to ensure that when users click on a particular property, they receive a short explanation of that property. The properties are shown in the exhibit. Which two actions should you perform?()A. Attach the Category attribute class to the controls class definition. Set its value to UserAddress. Mark the class as public.B. Attach the Browsable attribute class to each property in the group. Set its value to True. Mark the property as private.C. Attach the Category attribute class to each property in the group. Set its value to UserAddress. Mark the property as public.D. Attach the Description attribute class to each property in the group. Set each value to a description of the given property.E. Attach the DefaultProperty attribute class to each property in the group. Set each value to a description of the given property.

A team of programmers is involved in reviewing a proposed design for a new utility class. After some discussion, they realize that the current design allows other classes to access methods in the utility class that should be accessible only to methods within the utility class itself.What design issue has the team discovered?()A.Tight couplingB.Low cohesionC.High cohesionD.Loose couplingE.Weak encapsulationF.Strong encapsulation

A team of programmers is reviewing a proposed API for a new utility class. After some discussion,they realize that they can reduce the number of methods in the API without losing any functionality.If they implement the new design, which two OO principles will they be promoting?()A.Looser couplingB.Tighter couplingC.Lower cohesionD.Higher cohesionE.Weaker encapsulationF.Stronger encapsulation

A company that makes Computer Assisted Design (CAD) software has, within its application, some utility classes that are used to perform 3D rendering tasks. The company‘s chief scientist has just improved the performance of one of the utility classes‘ key rendering algorithms, and has assigned a programmer to replace the old algorithm with the new algorithm. When the programmer begins researching the utility classes, she is happy to discover that the algorithm to be replaced exists in only one class. The programmer reviews that class‘s API, and replaces the old algorithm with the new algorithm, being careful that her changes adhere strictly to the class‘s API. Once testing has begun, the programmer discovers that other classes that use the class she changed are no longer working properly.What design flaw is most likely the cause of these new bugs?()A.InheritanceB.Tight couplingC.Low cohesionD.High cohesionE.Loose couplingF.Object immutability

You have a class C network, and you need to design it for 5 usable subnets with each subnet handling a minimum of 18 hosts each. Which of the following network masks should you use?A.225.225.224.0.B.225.225.240.0.C.225.225.255.0.D.255.255.255.224E.225.225.255.240

C++ is used with proper(66) design techniques.A.class-orientedB.object-basedC.face to objectD.object-oriented

In software engineering the design phase is divided into( )。A.system design and detailed designB.computer design and program designC.system design and hardware designD.computer design and detailed design

In software engineering the design phase is divided into ( ). A.system design and detailed design B.computer design and program design C.system design and hardware design D.computer design and detailed design

A team of programmers is reviewing a proposed API for a new utility class.After some discussion, they realize that they can reduce the number of methods in the API without losing any functionality.If they implement the new design, which two principles will they be promoting?()A、Looser couplingB、Tighter couplingC、Lower cohesionD、Higher cohesionE、Weaker encapsulationF、Stronger encapsulation

public class Team extends java.util.LinkedList {  public void addPlayer(Player p) {  add(p);  }  public void compete(Team opponent) { /* more code here */ }  }  class Player { /* more code here */ }  Which two are true?()A、 This code will compile.B、 This code demonstrates proper design of an is-a relationship.C、 This code demonstrates proper design of a has-a relationship.D、 A Java programmer using the Team class could remove Player objects from a Team object.

A team of programmers is involved in reviewing a proposed design for a new utility class. After some discussion, they realize that the current design allows other classes to access methods in the utility class that should be accessible only to methods within the utility class itself. What design issue has the team discovered?()A、Tight couplingB、Low cohesionC、High cohesionD、Loose couplingE、Weak encapsulationF、Strong encapsulation

单选题You are creating a Windows Forms Application by using the .NET Framework 3.5.You plan to design a new control that will be used on multiple forms in the app.You need to ensure that the control meets the following requirement:   (1)It retrieves data from a MSSQL Server 2008 database instance.   (2)It uses WPF classes to display data.   (3)It uses user-customizable actions when the control is first painted on the form.    What should you do?()ACreate a new custom class for the control that is derived from the Control class.BCreate a new custom class for the control that is derived from the UserControl class.CCreate a new custom class for the control that is derived from the ContentControl class.DCreate a new custom class for the control that is derived from the ContentPresenter class.

单选题A company that makes Computer Assisted Design (CAD) software has, within its application, some utilityclasses that are used to perform 3D rendering tasks. The company’s chief scientist has just improved theperformance of one of the utility classes’ key rendering algorithms, and has assigned a programmer toreplace the old algorithm with the new algorithm. When the programmer begins researching the utilityclasses, she is happy to discover that the algorithm to be replaced exists in only one class. The programmer reviews that class’s API, and replaces the old algorithm with the new algorithm, being carefulthat her changes adhere strictly to the class’s API. Once testing has begun, the programmer discovers thatother classes that use the class she changed are no longer working properly. What design flaw is mostlikely the cause of these new bugs?()AInheritanceBTight couplingCLow cohesionDHigh cohesionELoose coupling

单选题In your web application,you need to execute a block of code whenever the session object is first created. Which design will accomplish this goal?()ACreate an HttpSessionListener class and implement the sessionInitialized method with that block ofcode.BCreate an HttpSessionActivationListener class and implement the sessionCreated method with thatblock of code.CCreate a Filter class, call the getSession(false) method, and if the result was null, then execute that block of code.DCreate an HttpSessionListener class and implement the sessionCreated method with that block of code.

多选题public class Team extends java.util.LinkedList {  public void addPlayer(Player p) {  add(p);  }  public void compete(Team opponent) { /* more code here */ }  }  class Player { /* more code here */ }  Which two are true?()AThis code will compile.BThis code demonstrates proper design of an is-a relationship.CThis code demonstrates proper design of a has-a relationship.DA Java programmer using the Team class could remove Player objects from a Team object.

单选题A team of programmers is involved in reviewing a proposed design for a new utility class. After some discussion, they realize that the current design allows other classes to access methods in the utility class that should be accessible only to methods within the utility class itself. What design issue has the team discovered?()ATight couplingBLow cohesionCHigh cohesionDLoose couplingEWeak encapsulation

单选题A team of programmers is involved in reviewing a proposed design for a new utility class. After some discussion, they realize that the current design allows other classes to access methods in the utility class that should be accessible only to methods within the utility class itself. What design issue has the team discovered?()ATight couplingBLow cohesionCHigh cohesionDLoose couplingEWeak encapsulationFStrong encapsulation

单选题A class design requires that a member variable cannot be accessible directly outside the class. Which modifier should be used to obtain the access control?()A publicB no modifierC protectedD private

单选题You are creating a Windows Forms application by using the .Net Framework 3.5.You plan to design a composite control for the application.You need to derive the control from a base class that supports templates.What should you do?()ADerive from the Control class.BDerive from the UserControl class.CDerive from the ScrollableControl class.DDerive from the ContainerControl class.

单选题You have a class C network, and you need to design it for 5 usable subnets with each subnet handling a minimum of 18 hosts each. Which of the following network masks should you use?()A225.225.224.0.B225.225.240.0.C225.225.255.0.D255.255.255.224E225.225.255.240

单选题You are the network administrator for Tailspin Toys. The company has a main office and two branch offices. The network in the main office contains 10 servers and 100 client computers. Each branch office contains 5 servers and 50 client computers. Each branch office is connected to the main office by a direct T1 line. The network design requires that company IP addresses must be assigned from a single classful private IP address range. The network is assigned a class C private IP address range to allocate IP addresses for servers and client computers. Tailspin Toys acquires a company named Wingtip Toys. The acquisition will increase the number of servers to 20 and the number of client computers to 200 in the main office. The acquisition is expected to increase the number of servers to 20 and the number of client computers to 200 in the branch offices. The acquisition will also add 10 more branch offices. After the acquisition, all branch offices will be the same size. Each branch office will be connected to the main office by a direct T1 line. The new company will follow the Tailspin Toys network design requirements. You need to plan the IP addressing for the new company. You need to comply with the network design requirement.  What should you do?()A Assign the main office and each branch office a new class A private IP address range. B Assign the main office and each branch office a new class B private IP address range.C Assign the main office and each branch office a subnet from a new class B private IP address range.D Assign the main office and each branch office a subnet from the current class C private IP address range.

单选题You are creating a Windows Forms Application by using the .NET Framework 3.5.You plan to design a control for the application.You need to ensure that the control meets the following requirements:    (1)Contains the DataGridView, BindingSource, and BindingNavigator controls.  (2)Exposes the properties of the BindingSource control.   (3)Protects the properties of the DataGridView and BindingNavigator controls.    What sholud you do?()AExtend the Control class.BExtend the ContainerControl class.CCreate protected accesses for each control property.DCreate public accesses for the properties of the BindingSource control.

单选题A team of programmers is reviewing a proposed API for a new utility class. After some discussion,they realize that they can reduce the number of methods in the API without losing any functionality.If they implement the new design, which two OO principles will they be promoting?()ALooser couplingBTighter couplingCLower cohesionDHigher cohesionEWeaker encapsulationFStronger encapsulation

单选题A company that makes Computer Assisted Design (CAD) software has, within its application, some utility classes that are used to perform 3D rendering tasks. The company's chief scientist has just improved the performance of one of the utility classes' key rendering algorithms, and has assigned a programmer to replace the old algorithm with the new algorithm. When the programmer begins researching the utility classes, she is happy to discover that the algorithm to be replaced exists in only one class. The programmer reviews that class's API, and replaces the old algorithm with the new algorithm, being careful that her changes adhere strictly to the class's API. Once testing has begun, the programmer discovers that other classes that use the class she changed are no longer working properly. What design flaw is most likely the cause of these new bugs?()AInheritanceBTight couplingCLow cohesionDHigh cohesionELoose couplingFObject immutability