Write a program which promptsuser to enter an integer value. Using while loop print the valuesfrom

zero up to the number enteredby the user.

• Enlist the odd numbers out of them

• Enlist the prime numbers out of odd number list and printtheir sum (add all the prime numbers)

Answers

Answer 1

Answer:Following is the c++ code for the problem:

#include <iostream>

using namespace std;

int main() {

   int number;

   cout<<"Enter the number"<<endl;

   cin>>number;

   int i=0,c=0,odd[500];

   while(i<=number)//loop for printing the numbers form 0 to number.

   {

       cout<<i<<" ";

       if(i%2!=0)// storing in the odd array if the number is odd.

       {

           odd[c++]=i;//storing odd numbers..

       }

       i++;

   }

   cout<<endl;

   i=0;

   cout<<"The odd numbers are "<<endl;

   while(i<c)//loop to print the odd numbers.

   {

       cout<<odd[i]<<" ";

       i++;

   }

   cout<<endl<<"The prime numbers are "<<endl;

   i=0;

   int sum=0;

   

   while(i<c)//loop to print the prime numbers..

   {

       int div=2;

       while(div<odd[i])

       {

           if(odd[i]%div==0)

           break;

           div++;

       }

       if(div==odd[i])

      {

           cout<<odd[i]<<" ";

           sum+=odd[i];//updating the sum..

      }

       i++;

   }

   cout<<endl<<"The sum of odd prime numbers is "<<sum<<endl;//printing the sum..

return 0;

}

Output :

Enter the number

49

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49  

The odd numbers are  

1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49  

The prime numbers are  

3 5 7 11 13 17 19 23 29 31 37 41 43 47  

The sum of odd prime numbers is 326 .

Explanation:

First I have printed the values from 0 to n and i have taken an array to store odd numbers.After that i have printed the odd values.And after that i have printed prime numbers among the odd numbers and their sum. These all operations are done using while loop.


Related Questions

Write the half function. A function call and the functionprototype
are provided.

void half(float *pv);

float value=5.0;

printf("Value before half: %4.1f\n",value); // Prints 5.0

half(&value);

printf("Value after half: %4.1f\n",value); // Prints 2.5

Answers

Answer:

C code for half()

#include<stdio.h>

void half(float *pv);

int main()

{

float value=5.0;  //value is initialized  

printf ("Value before half: %4.1f\n", value); // Prints 5.0

half(&value);  // the function call takes the address of the variable.

printf("Value after half: %4.1f\n", value); // Prints 2.5

}

void half(float *pv) //In function definition pointer pv will hold the address of variable passed.

{

*pv=*pv/2;  //pointer value is accessed through * operator.

}

This method is called call-by-reference method. Here when we call a function, we pass the address of the variable instead of passing the value of the variable. The address of “value” is passed from the “half” function within main(), then in called “half” function we store the address in float pointer ‘pv.’ Now inside the half(),  we can manipulate the value pointed by pointer ‘pv’. That will reflect in the main(). Inside half() we write *pv=*pv/2, which means the value of variable pointed by ‘pv’ will be the half of its value, so after returning from half function value of variable “value” inside main will be 2.5.

Output:

Output is given as image.

Given a one dimensional array arr, what is the correct way ofgetting the number of elements in arr

?? arr.length

?? arr.length – 1

?? arr.size – 1

?? arr.length()

Answers

Answer:

The answer is option 1 arr.length.

Explanation:

In java arr.length gives the correct number of elements in the array.The length is function is only applicable for arrays.

The length() method is applicable for strings.

arr.length-1 will give 1 element less.

There is no .size for arrays in java.

So we conclude that arr.length is correct way of getting the number of elements in one dimensional array arr.

Answer:

The answer is arr.length.

Explanation:

In java arr. length gives the correct number of elements in the array. The length() method is applicable for strings. arr. length-1 will give 1 element less. There is no . size for arrays in java. So we conclude that arr.

Learn more about the array, refer:

https://brainly.com/question/13971324.

Assume that the reference variable r refers to a serializable object. Write code that serializes the object to the file ObjectData.dat.

Answers

Answer:

FileOutputStream out = new FileOutputStream("ObjectData.dat");

ObjectOutputStream ostream = new ObjectOutputStream(out);

ostream.writeObject(r);

Explanation:

For object serialization, we can use the writeObject method of java.io.ObjectOutputStream class.

The complete code fragment is as follows:

import java.io.*;

class Demo{

      public static void main(String args[]){

             try{

                  r = <Reference to Object to be serialized> ;

                 FileOutputStream out = new FileOutputStream("ObjectData.dat");

                 ObjectOutputStream ostream = new ObjectOutputStream(out);

                  ostream.writeObject(r);

                 ostream.close();

            } catch(Exception e){

                   e.printStackTrace();

            }

      }

}

.When a design begins with a consideration of what the systemmust accomplish, it is called:
A.user-centered design B.data-driven design C.event-driven design D.task-centered design

Answers

Answer: D) Task-centered design

Explanation: Task centered design is the technique for a design to made in such a way that it can have the desired or expected result . The goals are set in it and the task is decided in a particular structure. Thus a design having any such system , it is known as task centered design. It is mainly focused on the user and the way this design can be used by them.

Give a Rationale for a layered approach to a network architecture. ? How does TCP/IP differ from ISO/OSI?

Answers

Answer: Layered network architecture enables us a clear loosely coupled system with a definite distinction between the various layers visible.

Explanation:

Layered architecture enable independent deployment of each of the different layer, so that emphasis can be laid to the layers in respect of their protocol deployment.

TCP/IP is a standard model which is being followed everywhere, however the OSI is a conceptual model. The TCP/IP is actually derived from the OSI model.

Both the models differ in the number of layers present in them.

TCP/IP has 4 layers whereas OSI has 7 layers.

How is the bootstrap program started?

Answers

Answer:

Bootstrapping :- It refers when a process does not require any input from outside to start.

Bootstrap program:- It is the first code that is executed when the computer system is started.

Bootstrap program is a part of ROM and it is non-volatile memory. Then the  operating system is loaded in the RAM by bootstrap program after the start of the computer system. Then the operating system starts the device drivers.

A bootstrap program is the first code that is executed when the computer system is started. ... The operating system is loaded into the RAM by the bootstrap program after the start of the computer system. Then the operating system starts the device drivers.

A ____ resembles a circle of computers that communicate with each other.
Answer
hierarchical network
star network
bus network
ring network

Answers

Answer:

ring network

Explanation:

In a ring network, the nodes are arranged in a circular pattern where each node is connected to two adjacent nodes. In this topology, any node can communicate with any other node via the intermediaries.

In comparison,

- in a star network every communication needs to pass through a central hub node

- in a bus, each node is connected to a shared linear communication bus.

- in a hierarchical network nodes are organized along a tree structure layout.

TRUE/FALSE

The Interrupt Flag (IF) controls the way the CPU responds to all interrupts.

Answers

Answer: True.

Explanation:

The value of the IF is very important to respond to the interrupts in the OS. It is a system flag bit. All the hardware interrupts will be handled if the flag value is set to 1 else all interrupts will be ignored. It takes two values either 1 or 0.

Microsoft has developed the Active Directory Domain structure so that a central authority, called the __________, is the repository for all domain security records.

Answers

Answer:

Domain Controller

Explanation:

Microsoft has developed the Active Directory Domain structure so that a central authority, called the domain controller, is the repository for all domain security records.

An active direct identifies and provides the enabled administrators for connecting to the windows-based It resources.  It helps the IT department to manage and secure the windows based system and apps.

A domain controller is a server computer that replies to the secure and authentic requests within a computer network.

Hence the answer is a domain controller.

Learn more about the Active Directory Domain structure so.

brainly.com/question/13591643.

Decision-making undercertainty is always easy to solve.
True
False

Answers

Answer:

False

Explanation:

Decision making is a complex subjective process which involves analyzing multiple inputs, current state and identifying the most relevant actions to achieve a set of desired objectives.

The process is complicated by factors such as:

- inadequacy or incorrectness of inputs

- unawareness of the current state

- lack of expertise of the decision maker

- multiplicity of potential actions which lead to desired outcomes

- fuzzy end objectives

Write a class named Add that has the following data members, constructor, and methods:

Data Members:
private int row; // The number of rows for the addition table.
private int column; // The number of columns for the addition table.
Constructor:
// Sets the values of the above data members.
public Add ( )
Methods:

Answers

Answer:

A class is like a blueprint of object.

Explanation:

A class defines the kinds of data and the functionality their objects will have.

A class enables you to create your own custom types by grouping together variables of other types, methods and events.

In C#, we can create a class  using the class keyword.

Here's a sample program:

using System;

namespace ConsoleApplication

{

   public class Test

   {

       public static void Main()

       {

           Add a1 = new Add(70, 50);

           a1.AddNumbers();                    

           Console.ReadLine();

       }      

   }

     class Add

   {

       private int row;

       private int column;

       public Add(int r, int c)

       {

           row = r;

           column = c;

       }

       public void AddNumbers()

       {

           Console.WriteLine(row+column);

       }

   }

}

output: 120

Explanation of the program:

I have created a class named Add. Within a class, row and column are two fields and AddNumbers() is a method. We also have constructor to initialize row and column.

In main method, If I need to invoke members of the class, I must create  an instance of the class. We can create any number of instances using the single class.IN our program, a1 is the reference variable using which we can invoke members of the class. I invoked function in the class and passed arguments to the constructor while creating an instance.

Those values are assigned to method variables and it operated the addition. Thus the output is 120.

In general, digital to analog modulation equipment is less expensive than the equipment for encoding digital data into a digital signal.

a) True b) False

Answers

Answer: False

Explanation:

As for the encoding process we require encoder, decoder, modulator which is less expensive than those required for modulation where we need devices for changing the amplitude, frequency and phase, which is more complex and expensive

Write a program that generates a random number between 5 and 15 and asks the user to guess what the number is. If the user’s guess is higher than the random number, the program should display Too high. Try again. If the user’s guess is lower than the random number, the program should display Too low, Try again. The program should use a loop that repeats while keeping a count of the number of guesses the user makes until the user correctly guesses the random number. Then the program should display the number of guesses along with the following message Congratulations. You figured out my number. Suggest that you also give the user the opportunity to play the game again or quit.

Answers

Answer: The c++ program for the number guessing game is given below.

#include <iostream>

using namespace std;

// method declaration without parameters

void game();

int main() {    

char reply;

// calling the game method

game();  

cout<<"Would you like to continue with the game ? Enter y to continue. Enter q to quit the game. " <<endl;

cin>>reply;  

if(reply == 'y')

    game();      

if(reply == 'q')

    cout<<"Quitting the game..."<<endl;  

return 0;

}

void game()

{

   int num, guess, attempt=0;  

num = (rand() % 10) + 6;  

cout<<endl<<"Welcome to the game of guessing the correct number "<<endl;  

   do

{    

    cout<<"Enter any number between 5 and 15. "<< endl;

    cin>>guess;      

    if(guess<5 || guess>15)

    {

        do

        {

            cout<<"Invalid number. Enter any number between 5 and 15. "<<endl;

            cin>>guess;

        }while(guess<5 || guess>15);

    }  

    if(guess < num)

    {

        cout<<"Too Low"<<endl;

        attempt++;        

    }

    if(guess > num)

    {

        cout<<"Too High"<<endl;

        attempt++;          

    }      

}while(guess != num);  

cout<<"Congratulations. You figured out my number in "<<attempt<< " attempts."<<endl;

}

Explanation:

The expression

(rand() % 10)

generates a random number between 0 and 9. 6 is added to generate a random number between 5 and 15.

The integer variable attempt is initialized to 0.

Next, user is asked to guess the number. If the user enters an invalid input, the do-while loop begins until a valid input is received from the user.

    cout<<"Enter any number between 5 and 15. "<< endl;

    cin>>guess;      

    if(guess<5 || guess>15)

    {

        do

        {

            cout<<"Invalid number. Enter any number between 5 and 15. "<<endl;

            cin>>guess;

        }while(guess<5 || guess>15);

    }  

User is prompted to input the guess using the same do-while loop as above. Until the user guesses the correct number, the loop continues. Each incorrect guess by the user, increments the variable attempt by 1. This represents the number of attempts done by the user to guess the correct number.

    if(guess < num)

    {

        cout<<"Too Low"<<endl;

        attempt++;        

    }

    if(guess > num)

    {

        cout<<"Too High"<<endl;

        attempt++;          

    }  

The random number generation and the guessing logic is put in a separate method game().

The entry and exit from the game only is put inside the main method.

Write a C++ program to exchange values of two variables using function exchange().

Answers

Answer:

#include<iostream>

using namespace std;

//create the exchange function

void exchange(int a, int b){

   int temp;  //initialize temporary

   //swap the variables value

   temp=a;

   a=b;

   b=temp;

   //print the output after exchange

   cout<<"a is: "<<a<<endl;

   cout<<"b is: "<<b<<endl;

}

//main function program start from here

int main(){

  //initialization

  int a=3, b=6;

  exchange(a,b);  //calling the function

  return 0;

}

Explanation:

Create the function exchange with two integer parameter which takes the value from the calling function.

and then declare the third variable temp with is used for swapping the value between two variables.

first store the value of 'a' in the temp and then assign the 'b' value to 'a' and then, assign the temp value to b.

for example;

a=2, b=9

temp=2;

a=9;

b=2;

So, the values are swap.  

and then print the swap values.

Create the main function and define the input a and b with values.

Then, calling the exchange function with two arguments.

A function that is called or summoned into action by its reference in another function is a ____.
A) function prototype
B) called function
C) calling function
D) function declarator

Answers

Answer:

Answer is B. Called function

Explanation:

The function which is called is the called function.

In which function we call it, that's calling function.

What is computer virus?

Answers

It is a (software) program that is installed on a computer without the user's knowledge for the purpose of making harmful changes. A computer virus attaches itself to another program (the execution of the host program triggers the action of the virus). And most of them perform actions that are malicious in nature, such as destroying data. A computer virus operates in two ways: As soon as it lands on a new computer, begins to replicate or it plays dead until the trigger kick starts the malicious code. The term 'computer virus' was formally defined by Fred Cohen in 1983.

Answer:

A computer virus is a virus attached onto your computer, and it gives you bugs and can often delete your important files.

Either a function’s _________ or its _________ must precede all calls to the function.

Answers

Answer:

Definition, Prototype

Explanation:

A function prototype is the one who declares return type,function name and parameters in it.

Syntax of function prototype

      returnType functionName(type1 argu1, type2 argu2,...);

Function definition contains the block of code to perform a specific task.

Syntax of function definition

            returnType functionName(type1 argu1, type2 argu2, ...)

          {

             //body of the function

           }

Whenever a function is called, the compiler checks if it's defined or not and control is transferred to function definition.

So,it is necessary to define the return type and parameters of the function.

Answer:

definition , prototype

Explanation: A function's definition and it's prototype must come before a function call otherwise the compiler will throw an error of undefined function whatever is the function name. Defining or giving prototype before the function call.The compiler will get to know that there a function exists with the function name and it will not give an error.

Convert the following binary numbers to decimal:

10010101
01110110
00110011
11100010
10000001

Answers

Answer:

Hi!

10010101 = 149;

01110110 = 118;

00110011 = 51;

11100010 = 226;

10000001 = 129;

Explanation:

To convert binary numbers you can use this formula:

[tex]N = bit_{1} * 2^{0} + bit_{2} * 2^{1} + bit_{3} * 2^{2} + bit_{4} * 2^{3} + ... + bit_n 2^{n-1}[/tex], where position of the bit₀ is the rightmost digit of the number.

Results, using the formula:

10010101 = 1*2⁰+1*2²+1*2⁴+1*2⁷ = 1 + 4 + 16 + 128 = 149.

01110110 = 1*2¹+1*2²+1*2⁴+1*2⁵+1*2⁶  = 118;

00110011 = 1*2⁰+1*2¹+1*2⁴+1*2⁵ = 51;

11100010 = 1*2¹+1*2⁵+1*2⁶+1*2⁷ = 226;

10000001 = 1*2⁰+1*2⁷ = 129;

Note: All bits in 0 multiplied by any number are 0.

Final answer:

To convert binary numbers to decimal, use the place value system. Multiply each digit by 2 raised to the power of its position and add up the results.

Explanation:

To convert binary numbers to decimal, we use the place value system. Each digit in the binary number represents a power of 2. We start from the rightmost digit and multiply it by 2 raised to the power of its position. Then, we add up all the results to get the decimal equivalent.

For example, for the binary number 10010101:

The rightmost digit is 1, so we multiply it by 2 raised to the power of 0, which is 1.The next digit is 0, so we multiply it by 2 raised to the power of 1, which is 2.We continue this process for all the digits and add up the results: 1 + 0 + 0 + 16 + 4 + 0 + 1 = 22.

So, the decimal equivalent of 10010101 is 22. Following the same steps, you can convert the other binary numbers to decimal.

The ____ is responsible for assigning maintenance tasks to individuals or to a maintenance team.
Answer
user
programmer
systems review committee
system administrator

Answers

Answer:

System Administrator

Explanation:

The System Administrator is responsible for assigning maintenance tasks to individuals or to a maintenance team.

The System Administrator’s role is to manage computer software systems, servers, storage devices  and network connections to ensure high availability and security of the supported business applications.

This  individual also participates in the planning and implementation of policies and procedures to ensure system  provisioning and maintenance that is consistent with company goals, industry best practices, and regulatory requirements.

System administrators may be members of an information technology department.

The duties of a system administrator may vary widely from one organization to another. They may sometimes do scripting and light-programming.

Following are some of the duties done by them:

User administration (setup and maintaining account) Maintaining system Verify that peripherals are working properly Quickly arrange repair for hardware in occasion of hardware failure Monitor system performance Create file systems Install software Create a backup and recover policy Monitor network communication Update system as soon as new version of OS and application software comes out Setup security policies for users. Documentation in form of internal wiki Password and identity management

What are the disadvantages of having too many featuresin a language?

Answers

Answer:

Disadvantage of having too many features in a language is that:

There are many functions with same name but perform different function or task so it will create an issue or problem. Features do not duplicate one another as, there are different possible syntax for the same meaning. In a mathematical function, sometimes user function and mathematical variable name collide with language base features so it will create problem.

write a C program the prints out the size of variables with the following C data types- int, long, unsigned, long long, double, float, char, and double

Answers

C program for finding size of different data types

#include <stdio.h>

//driver function

int main()

{

   int a;  //declaring a of type int

   float b; //declaring b of type float

   double c; //declaring c of type double

   char d; //declaring d of type char

   long e; //declaring e of type long

   long long f; //declaring f of type longlong

   unsigned g; //declaring g of type unsigned

   // Sizeof operator is used to evaluate the size of a variable

printf(" int data type contains: %lu bytes\n",sizeof(a));/*Finding size of int */

printf("float data type contains : %lu bytes\n",sizeof(b));/*Finding size of float */

printf("double data type contains: %lu bytes\n",sizeof(c));/*Finding size of double */

printf("char data type contains: %lu byte\n",sizeof(d));/*Finding size of char */

printf("long data type contains: %lu byte\n",sizeof(e));/*Finding size of long*/ printf("longlong data type contains: %lu byte\n",sizeof(f));/*Finding size of longlong */

printf("unsigned data type contains: %lu byte\n",sizeof(g)); /*Finding size of unsigned */

   return 0;

}

Output

int data type contains: 4 bytes

float data type contains : 4 bytes

double data type contains: 8 bytes

char data type contains: 1 byte

long data type contains: 8 byte

longlong data type contains: 8 byte

unsigned data type contains: 4 byte

What will the following code display?

int number = 6;
cout << ++number << endl;




1. 0

2. 5

3. 7

4. 6

Answers

Answer:

7

Explanation:

The operator '++number' is called the pre increment operator which is used to increment the value by 1 first and then assign.

for example:

int n = 10;

b = ++n;

here, it increase the value of 10 first then assign to b. hence, b assign the value 11.

similarly, in the question:

int number = 6;

after that, the pre increment operator increase the value by one and then assign to number.

it means number assign the value 7 and finally print the value.

Therefore, the answer is 7.

Is it legal to "use" an unprotected wireless access point that you discover in a public area? Is it ethical to use it? Hypothetically, if you were at an event and your computer detected a wireless network which was not protected and that was not sponsored by the event or its organizers, would you use it? Justify your answer

Answers

Answer:

The legality of use is dependent on the permissions provided by the owner, service provider ad state's laws. It is not ethical to use open wifi not provided or sponsored by event's organizer.

Some of the risk are:

Privacy leak and risk of confidentiality. Wifi data transfer occur using encryption but there are also some devices that can decrypt this data provided the have access the wifi. In open wifi, since everyone has access hence anyone with malicious intents can overlook your activities by decrypting data. This become more dangerous when a person is accessing bank statement or doing transactions on public wifi.

You want a class to have access to members ofanother class in the same package. Which is themost restrictive access that accomplishes thisobjective?
? public

? private

? protected

? transient

? default access

Answers

Answer:

default access

Explanation:

Classes, methods, variables(identifiers*) declared without any access modifier are considered as default and these can be accesed in others clases of same  package.

Identifiers are the name of classes, methods, variables, arrays, enums, etc.

____________________deals with syntax and semantics ofinformation exchange.

a. Presentation layer

b. Session layer

c. Application layer

d. Transport layer

Answers

Answer:

The answer is (a).Presentation Layer

Explanation:

This layer is located at the 6th level of the OSI model, responsible for delivering and formatting the information to the upper layer for further processing. This service is needed because different types of computer uses different data representation. The presentation layer handles issues related to data presentation and transport, including encryption,translation and compression.

Differentiate between the DFS and BFS algorithms for graphtraversal.

Answers

Answer:

DFS Algorithm stands for Depth First Search.

BFS Algorithm stands for Breadth First Search.

Explanation:

DFS stands for Depth First Search. In DFS, starting from the root node all the elements are scanned following one of the branches of the tree till it finds the desired element, if it hits the leaf node then the nearest ancestor is searched and son on.

BFS Algorithm stands for Breadth First Search. In BFS algorithm, starting from the root node all the vertices at the next level are scanned from left to right. That means, starting from the root node, all the level 1 nodes are searched from left to right and then all the level 2 nodes are searched and so on till the finding the desired node.

Both DFS and BFS are advantageous in their own way. However, the memory required for BFS is high when compared to DFS. This is because BFS has to keep track of the pointers of child nodes. If the element that we are searching lies at the end of the graph DFS is faster. If the element that we are searching lies at the top of the graph BFS is faster.

Non linear data structures are always betterthan linear data structures;why
please give me strong ressons withexamples.

Answers

Answer:

Linear data structures stores data in a sequential order while Non Linear data structures stores data in a non-sequential order.

Non Linear data structures are better than non - linear data structures in terms of memory utilization and they are multilevel or hierarchical approach.

The memory utilization in non linear data structures is always better than linear data structures. Since linear data structures tends to waste memory.

Linear data structures uses single level while non linear data structures uses multilevel to store the data.

linear data structures examples:- arrays,linked lists,stack,queue.

Non-Linear data structures ex:- tree,graphs,heaps.

Final answer:

Non-linear data structures and linear data structures each have their own advantages and use cases, so it is incorrect to say that one is always better than the other.

Explanation:

Non-linear data structures and linear data structures each have their own advantages and use cases, so it is incorrect to say that one is always better than the other.

Linear data structures like arrays and linked lists are simple and efficient for accessing and processing data sequentially. They are suitable for scenarios where data needs to be stored and retrieved in a specific order.

On the other hand, non-linear data structures like trees and graphs are useful when relationships and connections among data are more complex. For example, trees can be used to represent hierarchical structures such as file systems or organization charts, while graphs can be used to model networks and relationships between objects.

Building a linked list forward places the new item to be added at the beginning of the linked list.

True

False

Answers

Answer:

False

Explanation:

When a new item is added to a linked list it gets added to the rear end of the list.

For example if my list is as follows:

A->B->C

Now I want to add D, it will get added as follows:

A->B->C->D

Similarly if I add E, the updated list will become:

A->B->C->D->E

What are the differences between responsibility,accountability and liability?

Answers

Answer: Responsibility is the process when one has an authority over another, accountability means to be answerable to the action of the concerned and liability means to be legally responsible for the concerned.

Explanation:

A person who is responsible must be accountable and vice versa. In liability the person responsible must be governed by some documents for legal bindings to be help responsible for someones else action.

If there is no inheritance in Java then this environment may be__________but not ____________.
object oriented, object based
component based , object based
object based ,component based
object based , object oriented

Answers

Answer:

The answer is object based,component based.

Explanation:

If there is no inheritance in Java then the environment may be object based but not component based.

Component based is an approach in programming in which we divide a problem into different parts called components each of having a specific role in the program.

The difference between component based and object based is re-usability and scale. Component based means to emphasize on responsibilities which are mostly independent and may not share or may share common objects with other components.Object based means to emphasize on the integration of objects, where objects are reused over an entire software.That is why the environment may be object based but not component based.

Other Questions
Write as percents 1) 3/52)7/83)4/254)27/50Write as fractions1)50%2)34%3)56%4)33 1/3% Which of the following is true of Levina Bening Teerlinc? a. She was the highest paid artist in Henry VIIIs court. b. She was involved in Queen Elizabeths court. c. She was one of Henry VIIIs wives. d. A and B are true. On July 9, you purchased 600 shares of Blue Water stock for $32 a share. On August 4, you sold 100 shares of this stock for $33 a share. You sold an additional 100 shares on August 14 at a price of $34.50 a share. The company declared a dividend of $.76 per share on August 3 to holders of record as of Monday, August 17. This dividend is payable on September 15. How much dividend income will you receive on September 15? a.$304 b.$418 c.$380 d.$360 e.$456 Which of these is part of a good dental hygiene? Which of the following methods can be used to obtain sodium chloride from a solid mixture containing sodium chloride and ammonium chloride?A. heatingB. adding water and filteringC. adding sodium hydroxide solution and filteringD. adding silver nitrate solution and filtering The principal function of structure X (Large Intestine) is toA) produce salivary enzymes B) secrete sex hormonesC) absorb waterDidigest ble Most animals and plants reproduce sexually. This means that DNA is passed down to new organisms from two parental organisms. Which of the following is a key advantage of sexual reproduction? A. The elimination of genetic mutations from a parent organism B. Increased genetic diversity for changing environments C. The receipt of the strongest genes from both parents for survival D. The creation of new genes to improve surviva Suppose the gravitational acceleration on a certain planet is only 4.0 m/s2. A space explorer standing on this planet throws a ball straight upward with an initial velocity of 24 m/s. Assume that upward direction is positive. What is the velocity of the ball 3 seconds after it is thrown? What coefficients balance the equation: NH3 + H2O + NH4OHPLEASE HELP Hello,..... I will mark you as a brainliest A frog is there in a 12m deep well. The frog wants to jump out of the well . Every time it jumps 3m & falls back by 1m. In how many jumps will he come out of the well ???Remember, I will mark you as a brainliest... Ryan is putting money into a savings account. He starts with $450in the savings account, and each week he adds $30Let S represent the total amount of money in the savings account (in dollars), and let W represent the number of weeks Ryan has been adding money. Write an equationrelating S to W. Then use this equation to find the total amount of money in the savings account after 14 weeks.equation=total amount of money after 14 weeks= $? The process by which the bureaucracy produces what is effectively legislation is calledA. rule-making.B. administrative discretion.C. activism.D. selective implementation.E. the formal hearing procedure. 12. This question is based on the following paragraph. The sentences are numbered to help you answer the question. someone plz help asap(1) Earth's crust is made up of relatively rigid plates that ride atop Earth's hot, semiliquid mantle. (2) The plates are called tectonic because they're in constant motion. (3) They can move because Earth's mantle is a very hot and semiliquid fluid called magma. (4) Volcanoes are a result of magma rising up or erupting through a plate, particularly where plate boundaries are moving against each other. (5) Also, when plates slide against each other, causing friction along adjacent plate boundaries, earthquakes frequently occur. (6) Therefore, we often find volcanoes and earthquakes along plate boundaries. (7) Plates may also collide. (8) When that happens, mountain ranges are formed. (9) For example, the collision of the plate carrying the Indian subcontinent created the Himalayan Mountains when it collided with the Asian plate.Which statement about this paragraph is accurate? A. The topic sentence is the found in the last line. B. There are no supporting details for the main idea. C. There is no single topic sentence. D. The author uses comparison and contrast to organize ideas. A 2.07-kg fish is attached to the lower end of an unstretched vertical spring and released. The fish drops 0.131 m before momentarily coming to rest. (a) What is the spring constant of the spring? (b) What is the period of the oscillations of the fish? ? What is the vertex if angle XYZ Use Newton's method to determine the angle , between 0 and /2 accurate to six decimal places. for which sin() = 0.1. Show your work until you start computing x1, etc. Then just write down what your calculator gives you. What is the fastest time trial for the first quarter checkpoint? _____ seconds What is the slowest time trial for the first quarter checkpoint? _____ seconds What is the range of times measured for this checkpoint? _____ seconds Why does residual volume increase as capacity decreases? What is the equation of the line that passes through (1, 2) and is parallel to the line whose equation is 2x + y - 1=0? The polynomial below is a perfect square trinomial of the form A2 - 2AB + B2.