Question

chose the best definition for Class a. an object definition, containing the data function elements necessary...

chose the best definition for Class

a. an object definition, containing the data function elements necessary create an object

b. an action in a program

c. a group of people

d. program execution

---------------------------

Choose the best definition of java script

a. a file on disk

b. An instance of a class

c. method class

d. native data types

---------------------------------

Choose the appropriate data type for this value: true

a.double

b.string

c.Boolean

d.int

--------------------

Choose the appropriate data type for this value: 5.5

a.boolean

b.String

c.double

d.int

---------------------------------------

Choose the best data type to hold the values of all possible correct answers on a multiple choice questions 'A', 'B', 'C', or 'D'

a. double

b.String

c.int

d.char

-------------------------------

Choose the appropriate data type for this value '1' that will never be longer than one digit

a.Boolean

b.String

c.int

d.char

----------------------------

Choose the appropriate data type for this field: kinfOfBirdd

a.String

b.double

c.char

d.int

------------------------------

Choose the appropriate data type for this field: numberOfEggs

a.boolean

b.double

c.string

d.int

-----------------------------------------------

Choose the appropriate data type for this field: isSwimmer

a.String

b.int

c.boolean

d. double

-------------------------------------

What is the main purpose of variables in programming?

a. to hold values in the memory of the computer

b.methods to work on data

c. CamelCasing naming conventions

d. to enforce program scoping

Homework Answers

Answer #1

1) Answer is option (a). an object definition, containing the data function elements necessary to create an object
why because, the class is described as one or more objects.object is an instance of the class. so the option 'a' is the answer.

2)Answer is option (c).method class
why because Method class gives data about a single method in a class.

3)Answer is option (c). Boolean
why because, Boolean variables consist of only two values, ie, true or false.
other options do not belong to this question. because double datatype consists of floating-point numbers, string consist of variables, and int datatype consists of integers.

4)Answer is option (c).double
why because, as we said earlier that, double datatype consists of floating-point numbers. other options do not belong to this question. because Boolean variables consist of only two values, ie, true or false, string consist of variables, and int datatype consist of integers.

5)Answer is option (d). char
why because, char datatype consists of characters with single-byte or multibyte.other options are not belongs to this question. because double datatype consists of floating-point numbers, string consists of variables, and int datatype consists of integers.

6)Answer is option (d). char
why because, char datatype consists of characters with single-byte or multibyte, and it is enclosed within single quotes.other options do not belong to this question. because int datatype consists of integers, Boolean variables consist of only two values, ie, true or false, string consists of variables.

7)Answer is an option (a). string
why because, string consist of variables, other options do not belong to this question. because char datatype consists of characters with single-byte or multibyte, double datatype consists of floating-point numbers, and int datatype consists of integers.

8)Answer is option (d). int
why because int datatype consists of integers. other options do not belong to this question. because Boolean variables consist of only two values, ie, true or false, double datatype consists of floating-point numbers, and string consists of variables.

9)Answer is option (c). boolean
why because, Boolean variables consist of only two values, ie, true or false.
other options do not belong to this question. because double datatype consists of floating-point numbers, string consist of variables, and int datatype consists of integers.

10)Answer is option (a).to hold values in the memory of the computer
why because variables are stored on the stack area or heap area and local variables are stored on the stack area.so other options do not belong to this question.

hope you got the correct answer...

Please like...Thank you!

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
1) Consider the following Java program, which one of the following best describes "setFlavor"? public class...
1) Consider the following Java program, which one of the following best describes "setFlavor"? public class Food {     static int count;     private String flavor = "sweet";     Food() { count++; }     void setFlavor(String s) { flavor = s; }     String getFlavor() { return flavor; }     static public void main(String[] args) {         Food pepper = new Food();         System.out.println(pepper.getFlavor());     } } a. a class variable b. a constructor c. a local object variable d....
in jGRASP INVENTORY CLASS You need to create an Inventory class containing the private data fields,...
in jGRASP INVENTORY CLASS You need to create an Inventory class containing the private data fields, as well as the methods for the Inventory class (object). Be sure your Inventory class defines the private data fields, at least one constructor, accessor and mutator methods, method overloading (to handle the data coming into the Inventory class as either a String and/or int/float), as well as all of the methods (methods to calculate) to manipulate the Inventory class (object). The data fields...
The following is for a Java Program Create UML Class Diagram for these 4 java classes....
The following is for a Java Program Create UML Class Diagram for these 4 java classes. The diagram should include: 1) All instance variables, including type and access specifier (+, -); 2) All methods, including parameter list, return type and access specifier (+, -); 3) Include Generalization and Aggregation where appropriate. Java Classes description: 1. User Class 1.1 Subclass of Account class. 1.2 Instance variables __ 1.2.1 username – String __ 1.2.2 fullName – String __ 1.2.3 deptCode – int...
In C++ Employee Class Write a class named Employee (see definition below), create an array of...
In C++ Employee Class Write a class named Employee (see definition below), create an array of Employee objects, and process the array using three functions. In main create an array of 100 Employee objects using the default constructor. The program will repeatedly execute four menu items selected by the user, in main: 1) in a function, store in the array of Employee objects the user-entered data shown below (but program to allow an unknown number of objects to be stored,...
c++ Design a class named Account that contains (keep the data fields private): a) An int...
c++ Design a class named Account that contains (keep the data fields private): a) An int data field named id for the account. b) A double data field named balance for the account. c) A double data field named annualInterestRate that stores the current interest rate. d) A no-arg constructor that creates a default account with id 0, balance 0, and annualInterestRate 0. e) The accessor and mutator functions for id, balance, and annualInterestRate. f) A function named getMonthlyInterestRate() that...
Design a Java class named Polygon that contains:  A private int data field named numSides...
Design a Java class named Polygon that contains:  A private int data field named numSides that defines the number of sides of the polygon. The default value should be 4.  A private double data field named sideLength that defines the length of each side. The default value should be 5.0.  A private double data field named xCoord that defines the x-coordinate of the center of the polygon. The default value should be 0.0.  A private double...
Challenge: Animal Class Description: Create a class in Python 3 named Animal that has specified attributes...
Challenge: Animal Class Description: Create a class in Python 3 named Animal that has specified attributes and methods. Purpose: The purpose of this challenge is to provide experience creating a class and working with OO concepts in Python 3. Requirements: Write a class in Python 3 named Animal that has the following attributes and methods and is saved in the file Animal.py. Attributes __animal_type is a hidden attribute used to indicate the animal’s type. For example: gecko, walrus, tiger, etc....
Please write the code in Python. Write a program/function in any Object-Oriented programming language that will...
Please write the code in Python. Write a program/function in any Object-Oriented programming language that will implement Queue Abstract Data Type with the following functions/methods.  Any build-in/pre-defined Queue function/library (e.g., java.util.Queue in Java) is NOT allowed to use in your code. push(Element):  insert the input Element (e.g., String or Integer in Java) to the end of the queue. pop(): remove the head element of the queue and print the head element on screen. count():  return the total number of elements in the queue...
Objective: Write a Java program that will use a JComboBox from which the user will select...
Objective: Write a Java program that will use a JComboBox from which the user will select to convert a temperature from either Celsius to Fahrenheit, or Fahrenheit to Celsius. The user will enter a temperature in a text field from which the conversion calculation will be made. The converted temperature will be displayed in an uneditable text field with an appropriate label. Specifications Structure your file name and class name on the following pattern: The first three letters of your...
Java Program Implement a class called AnimalTrainer. Include the following data types in your class with...
Java Program Implement a class called AnimalTrainer. Include the following data types in your class with the default values denoted by dataType name : defaultValue - String animal : empty string - int lapsRan : 0 - boolean resting : false - boolean eating : false - double energy : 100.00 For the animal property implement both getter/setter methods. For all other properties implement ONLY a getter method Now implement the following constructors: 1. Constructor 1 – accepts a String...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT