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
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...
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....
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...
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....
WRITE A JAVA PROGRAM: The last digit of a credit card number is the check digit,...
WRITE A JAVA PROGRAM: The last digit of a credit card number is the check digit, which protects against transaction errors. The following method is used to veryfy credit card numbers. For the simplicity we can assume that the credit card has 8 digits instead of 16. Following steps explains the algorithm in determining if a credit card number is a valid card.  Starting from the right most digit, form the sum of every other digit. For example, if...
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...
Classes/ Objects(programming language java ) in software (ATOM) Write a Dice class with three data fields...
Classes/ Objects(programming language java ) in software (ATOM) Write a Dice class with three data fields and appropriate types and permissions diceType numSides sideUp The class should have A 0 argument (default) constructor default values are diceType: d6, numSides: 6, sideUp: randomValue 1 argument constructor for the number of sides default values are diceType: d{numSides}, sideUp: randomValue 2 argument constructor for the number of sides and the diceType appropriate accessors and mutators *theoretical question: can you change the number of...
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...
we defined, implemented, and tested a class Time. In this lab, we will continue working with...
we defined, implemented, and tested a class Time. In this lab, we will continue working with the Time class. A. Separate the class definition and class implementation from the client program. Move the class definition into a header file named Time.h and move the class implementation into a cpp file named Time.cpp. Use preprocessor directive to include header files as needed. B. Modify the Time class as follows: 1. Replace the default constructor and overloaded constructor with a constructor with...