Question

PLEASE GIVE THE FULL DETAILS OF THE STEPS ON EACH QUESTIONS SO I COULD FOLLOW UP...

PLEASE GIVE THE FULL DETAILS OF THE STEPS ON EACH QUESTIONS SO I COULD FOLLOW UP YOUR WHOLE EXPLANATIONS.

PLEASE WRITE THE STEPS ON EX) STEP 1, STEP 2, ETC

HANDWRITING IS OKAY AS LONG AS IT IS READABLE.

IF YOU HAVE USED THE EQUATIONS OR CONCEPTS, PLEASE STATE IT CLEARLY WHICH ONE YOU HAVE YOU USED SO I COULD FULLY UNDERSTAND THE DETAILS OF THE STEPS YOU HAVE DONE.

PLEASE DO NOT OMIT THE DETAILS OF STEPS AND CONCEPTS YOU HAVE USED, CLEARLY STATE IT!!

PLEASE INCLUDE THE TABLES OR DRAWINGS IF IT CAN BE VISUALIZED (STACK DIAGRAMS, ARRAY (ARROW), ETC)

Smallest number with sum of digits as N and divisible by 10^N.

Object Oriented concept, Polymorphism , Method overloading, method overriding, Difference between abstraction and encapsulation, Aggregation and Composition.

DeadLock example code.

Explain database normalization?

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Object Oriented concept: It simply nothing but every thing sholud be commincated with objects,that means the data should be tranformed in the form of objects and via comminacated with objects only.

polymorphism means having many forms.
polymorphism means that a call to a member function will cause a different function to be executed depending on the type of object that invokes the function.


#include <iostream>
using namespace std;

class Shape {
protected:
int width, height;
  
public:
Shape( int a = 0, int b = 0){
width = a;
height = b;
}
int area() {
cout << "Parent class area :" <<endl;
return 0;
}
};
class Rectangle: public Shape {
public:
Rectangle( int a = 0, int b = 0):Shape(a, b) { }
  
int area () {
cout << "Rectangle class area :" <<endl;
return (width * height);
}
};

class Triangle: public Shape {
public:
Triangle( int a = 0, int b = 0):Shape(a, b) { }
  
int area () {
cout << "Triangle class area :" <<endl;
return (width * height / 2);
}
};

// Main function for the program
int main() {
Shape *shape;
Rectangle rec(10,7);
Triangle tri(10,5);

// store the address of Rectangle
shape = &rec;

// call rectangle area.
shape->area();

// store the address of Triangle
shape = &tri;

// call triangle area.
shape->area();

return 0;
}

Overloading and Overriding:
overloading means functions with same name having different parameters , it does not really depend whether you are using procedural language or object oriented language you can do overloading. well as far as over riding is concerned it means we are explicitly defining a function that exist in base class in derived class . obviously you need object oriented language to perform over riding as it is done between base and derived classes.
for overriding the base class and derived class ha same function name and same paramters but it will took dervied class function to replace the base class method.


Abstraction is a process to abstract or hide the functionality and provide users or other programmers to use it only.


Encapsulation means to encapsulate or put everything into one thing and provide others to use.Here simply we can say the combination of data menber and member fuctions.

Aggregation is a special form of association. It is a relationship between two classes like association, however its a directional association, which means it is strictly a one way association. It represents a HAS-A relationship.
example:It hows the has a realtionip.

Composition is a specialized form of aggregation in which if the parent object is destroyed, the child objects would cease to exist. It is actually a strong type of aggregation and is also referred to as a "death" relationship.


#include <stdio.h>
#include <pthread.h>

void* joinit(void* tid)
{
printf("In %#x, waiting on %#x\n", pthread_self(), (*((pthread_t*)tid)));
pthread_join((*((pthread_t*)tid)), NULL);
printf("Leaving %#x\n", pthread_self());
return NULL;
}

int main(void)
{
pthread_t thread1 = pthread_self();
pthread_t thread2;
pthread_create(&thread2, NULL, joinit, &thread1);
joinit(&thread2);
return 0;
}

here are simple code while forming a deadlock.
p1 thread is inc with reource r1 and p2 thread is also sync with reourece R1 it will not form beacuse reourece R1 is also sync with P1 then will form the dead lock this is the sutuation will occurs.

Database Normalization:normalization is about the structure of a relational schema,simply we can say to minimise redundant data and to prevent update anomalies.

It contains 5 normalization forms based on them we have minminze the unwnated rows and colums

here we have to find the smallet number to be find

def findNum (n):
    testnum = n
    while testnum <= 1000:
        tempnum = testnum
        sum = 0
        while tempnum > 0:
            sum = sum + (tempnum mod 10)
            tempnum = int (tempnum / 10)
        if sum == n:
            return testnum
        testnum = testnum + n
    return -1

here i the logic to find the smallest number which is divisble by 10 ^ N

Add a comment
Know the answer?
Add Answer to:
PLEASE GIVE THE FULL DETAILS OF THE STEPS ON EACH QUESTIONS SO I COULD FOLLOW UP...
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. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • PLEASE GIVE THE FULL DETAILS OF THE STEPS ON EACH QUESTIONS SO I COULD FOLLOW UP...

    PLEASE GIVE THE FULL DETAILS OF THE STEPS ON EACH QUESTIONS SO I COULD FOLLOW UP YOUR WHOLE EXPLANATIONS. PLEASE WRITE THE STEPS ON SOLVING THIS EXAMPLE EX) STEP 1, STEP 2, ETC HANDWRITING IS OKAY AS LONG AS IT IS READABLE. IF YOU HAVE USED THE EQUATIONS OR CONCEPTS, PLEASE STATE IT CLEARLY WHICH ONE YOU HAVE YOU USED SO I COULD FULLY UNDERSTAND THE DETAILS OF THE STEPS YOU HAVE DONE. PLEASE DO NOT OMIT THE DETAILS OF...

  • PLEASE GIVE THE FULL DETAILS OF THE STEPS ON EACH QUESTIONS SO I COULD FOLLOW UP...

    PLEASE GIVE THE FULL DETAILS OF THE STEPS ON EACH QUESTIONS SO I COULD FOLLOW UP YOUR WHOLE EXPLANATIONS. PLEASE WRITE THE STEPS ON SOLVING THIS EXAMPLE EX) STEP 1, STEP 2, ETC HANDWRITING IS OKAY AS LONG AS IT IS READABLE. IF YOU HAVE USED THE EQUATIONS OR CONCEPTS, PLEASE STATE IT CLEARLY WHICH ONE YOU HAVE YOU USED SO I COULD FULLY UNDERSTAND THE DETAILS OF THE STEPS YOU HAVE DONE. PLEASE DO NOT OMIT THE DETAILS OF...

  • PLEASE GIVE THE FULL DETAILS OF THE STEPS ON EACH QUESTIONS SO I COULD FOLLOW UP...

    PLEASE GIVE THE FULL DETAILS OF THE STEPS ON EACH QUESTIONS SO I COULD FOLLOW UP YOUR WHOLE EXPLANATIONS. PLEASE WRITE THE STEPS ON EX) STEP 1, STEP 2, ETC HANDWRITING IS OKAY AS LONG AS IT IS READABLE. IF YOU HAVE USED THE EQUATIONS OR CONCEPTS, PLEASE STATE IT CLEARLY WHICH ONE YOU HAVE YOU USED SO I COULD FULLY UNDERSTAND THE DETAILS OF THE STEPS YOU HAVE DONE. PLEASE DO NOT OMIT THE DETAILS OF STEPS AND CONCEPTS...

  • Could someone please identify the steps I have to follow when determining a chemical structure based...

    Could someone please identify the steps I have to follow when determining a chemical structure based on Molecular formula, IR spectrum , HNMR, 13CNMR. I know what each test identify in a structure I just do not understand how to prioterise which one you should look at first and how could this help in the next step. Thank you

  • I need to answer these test questions Choose all of the following which are benefits of...

    I need to answer these test questions Choose all of the following which are benefits of using meaningful names in writing clean code. Always use abbreviations to keep things short Clearly differentiate names Make as similar as possible Be descriptive and imply type Use descriptive names but don't include details about implementation Is __init_. a magic method? TRUE FALSE True or False: Functions should bring multiple actions together so they are more efficiently run. TRUE FALSE What are some considerations...

  • There are 7 steps to the question. Please advise what can I do to get all questions answered. I am ok with posting more...

    There are 7 steps to the question. Please advise what can I do to get all questions answered. I am ok with posting more than 1 questions for this problem as a whole. Please use excel and demonstrate the excel formule for the same. Case Study Description A $6M investment is considered by an electric bike manufacturing company to add a new production line for its new product, electric skateboards. The company has commissioned an exploratory study of where to...

  • C# - Inheritance exercise I could not firgure out why my code was not working. I...

    C# - Inheritance exercise I could not firgure out why my code was not working. I was hoping someone could do it so i can see where i went wrong. STEP 1: Start a new C# Console Application project and rename its main class Program to ZooPark. Along with the ZooPark class, you need to create an Animal class. The ZooPark class is where you will create the animal objects and print out the details to the console. Add the...

  • I just need help with the highlighted section please give details File Teols View Homework -...

    I just need help with the highlighted section please give details File Teols View Homework - Chapter 14 To b e the cost of equity for TSLA, to finance yahoo.com and t he ticket wybol TSLA. Follow the links to the following questions What is the most a price and for TSLAY What is the market value of guy, of m et carbon How many shares of stock does TSLA utanding? What is the most recent and can you the...

  • Matlab Questions (please show what code I need, including any comments, for each of the questions):...

    Matlab Questions (please show what code I need, including any comments, for each of the questions): 1)  Initialize two row vectors a and b of arbitrary but equal lengths (pick any length ³3) with random numbers between 0 and 1. Recalling that the dot product between two vectors is a ∙ b = |a||b| cos theta, calculate the angle, theta, between the two vectors (radians or degrees is fine, just state what you used). Note: • You can use built-in inverse...

  • i will give a thumb up for sure if it helps me :) Please Summarize this...

    i will give a thumb up for sure if it helps me :) Please Summarize this article about Communicating competitive information,and Applying Game Theory To Managing Price Competition. Pricing Strategies Course -No longer than 400 words. Like any other type of market research, information about competitors will be most valuable if it is collected and stored in a systematic way. Activities such as shopping the competition should be done thoroughly and periodically. Information from different sources should be merged into...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT