Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please solve all questions and just give answer no explanations needed...thank you A Moving to the next question prevents changes to this answer. Question 12

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

please solve all questions and just give answer no explanations needed...thank you

A Moving to the next question prevents changes to this answer. Question 12 For the following code, what would be the value of str[2]? string0 str = {"abc", "def", "ghi", "jk1"}; O "def" a reference to the String object containing "def" O a reference to the String object containing "ghi" O "ghi" A Moving to the next question prevents changes to this answer. A Moving to the next question prevents changes to this answer. Question 13 refers to combining data and code into a single object. Data hiding O Encapsulation The constructor Abstraction ho A Moving to the next question prevents changes to this answer. Moving to the next Question prevents changes to this answer Question 14 Which symbol indicates that a member is public in a UML diagram? Mong to the next question prevents changes to this answer A Moving to the next question prevents changes to this answer. Question 15 Which symbol indicates that a member is private a UML diagram? A Moving to the next question prevents changes to this answer. A Moving to the next question prevents changes to this answer. Question 16 To indicate the data type of a variable in a UML diagram, you enter o the class name followed by the variable name followed by the data type o the variable name followed by a colon and the data type o the variable name followed by the data type O the data type followed by the variable name A Moving to the next question prevents changes to this answer. ompletion Status: A Moving to the next question prevents changes to this answer. Question 17 key word in their headers. Instance methods do not have the private o static public protected A Moving to the next question prevents changes to this answer. Question 18 Methods that operate on an object's fields are called O public methods O private methods instance methods instance variables OO A Moving to the next question prevents changes to this answer. public class Order { private int orderNum; private double orderAmount; private double orderDiscount; public Order (int orderNumber, double orderAmt, double orderDisc) { orderNum = order Number; orderAmount = orderAmt; orderDiscount = orderDisc; } public double finalOrderTotal() return orderAmount orderAmount * orderDiscount; 3 } public class CustomerOrder public static void main(String[] args) { Order order; int orderNumber = 1234; double orderAmt = 580.00; double orderDisc = .1; order = new Order (orderNumber, orderAmt, orderDisc); double finalAmount = order. finalorderTotal(); System.out.printf("Final order amount = $$,.2f ", finalAmount); Oo 528.00 580.00 522.00 There is no value because the object, order, has not been created. Question 20 For the following code, which statement is not true? public class Sphere { private double radius; public double x; private double y; private double z; ho ) The radius, x, y, and z fields are members of the Sphere class. The radius field is not available to code written outside the Sphere class. The z field is available to code written outside the Sphere class. The x field is available to code that is written outside the Sphere class. A Moving to the next question prevents changes to this answer. L A Moving to the next question prevents changes to this answer. Question 21 Assume that the following method header is for a method in class A. public void displayValue (int value) Assume that the following code segments appear in another method, also in class A. Which contains a legal call to the displayValue method? int x = 7; displayValue (x); int x = 7; O displayValue(int x); int x = 7; O void displayValue (x); int x = 7; O displayValue (x)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Learn Mysql The Easy Way A Beginner Friendly Guide

Authors: Kiet Huynh

1st Edition

B0CNY7143T, 979-8869761545

More Books

Students also viewed these Databases questions