Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

Create an Inventory class that a warehouse might use to represent their stock of products and raw materials. Include a data member of type string to provide a description of the product, and data member of type int to represent the balance stock. Provide a constructor that receives an initial product and uses it to initialize the data members. The constructor should validate the initial product to ensure it has a stock greater than 20, which is the company’s minimum stock level. If not, it should display an error message. Provide three member functions. Member function Purchase should add a product to the current stock. Member function Sale should reduce stock. Ensure after each sale that the stock level does not drop below 20. Member function getStock should return the current stock. Create a program that creates two Inventory objects and tests the member functions of the class.


In the main function, define an array that can contain four int values. Also define an int named sum.

Write a function named getData which asks the user for the data and puts it in the array.

Write a function named computeTotal which adds the data in the array and returns the sum.

Write a function named printAll which takes the array and the sum as arguments.

In the main function, call the getData function.

Then in the main function, call the computeTotal function.

Then in the main function, call the printAll function.

Print the results in the formats shown in the following format:

4 + 6 + 9 + 12 = 31
  

Test the program twice with the values:

4, 6, 9, and 12.

then with the values:

1, 7, 9, and 15.


Nature View

The goal of this coding exam is to quickly get you off the ground with the media feature orientation with different values

Refer to the below images

In portrait mode

https://assets.ccbp.in/frontend/content/intermediate-rwd/nature-view-op-portrait.png

In landscape mode

https://assets.ccbp.in/frontend/content/intermediate-rwd/nature-view-op-landscape.png

  • The given pre-filled code is of in portrait mode.
  • Apply media query to the screen devices such that when the width of the viewport is greater than the height then
  • The background image for the CSS class selector with the name nature-view-container should be the same as shown in the reference image.
  • The background color for the HTML button should be changed.
  • The font-size for the HTML heading element should be of 48px.

Resources

Use the image URL given below.

  • https://assets.ccbp.in/frontend/content/intermediate-rwd/nature-view-landscape.png

You do not need to use any functions beyond the main function in this problem.

Initialize an array of int with the values: 4, 6, 9, and 12.

Write a for loop to add the values in the array and find their sum.

Use a loop to print the values in the array.

Print the values in the array and the sum in the following format:

4 + 6 + 9 + 12 = 31
  

Responsive Header

Refer to the below images

Extra Small (Size < 576px), Small (767 >= 576px):

https://assets.ccbp.in/frontend/content/intermediate-rwd/responsive-header-op-mobile-v2.png

Medium (Size >= 768px), Large (Size >= 992px) and Extra Large (Size >= 1200px):

https://assets.ccbp.in/frontend/content/intermediate-rwd/responsive-header-op-desktop.png

  • Add the necessary HTML elements to the HTML container element with the class mobile-nav-items-container
  • Apply media query to extra small and small screen devices such that the CSS class selector with the name header should have desired flexbox property and value.
  • Apply media query to medium and above screen devices such that the output should be the same as shown in the respective reference image.

Resources

Use the image URLs given below.

  • https://assets.ccbp.in/frontend/content/intermediate-rwd/home-v3.png
  • https://assets.ccbp.in/frontend/content/intermediate-rwd/bookmark-v3.png
  • https://assets.ccbp.in/frontend/content/intermediate-rwd/upload-v3.png








Responsive Layout

Refer to the below image

Extra Small (Size < 576px), Small (Size >= 576px):

https://assets.ccbp.in/frontend/content/intermediate-rwd/responsive-layout-op-mobile.png

Medium (Size >= 768px), Large (Size >= 992px) and Extra Large (Size >= 1200px):

https://assets.ccbp.in/frontend/content/intermediate-rwd/responsive-layout-op-desktop.png

  • The given pre-filled code is of extra small and small devices.
  • Apply media query to the medium and above screen devices such that
  • The CSS class selector with the name menu-and-body-container should have desired flexbox property and value such that output should be the same as shown in the reference image.
  • The font-sizes for the heading text of the navbar, menu, body and footer sections should be 24px.
  • The heading text of the navbar, menu, body, and footer should align to the left of the respective container.








In the main function, define five variables of type int, named: first, second, third, fourth, and total. Also in the main function, define three variables of type double named: decimalOne, decimalTwo and decimalTotal

Write one function named getData which asks the user for the data and puts it in first, second, third, fourth, decimalOne, and decimalTwo. (You may copy your getData from problem I1 and make additions to manage fourth, decimalOne, and decimalTwo.) Write a function named computeTotal which can take two, or three int arguments and returns an int. Write another function, also named computeTotal which takes four int arguments and returns an int. Write another function, also named computeTotal which takes two double arguments and returns a double. Write a function named printAll which takes three arguments of type int. Write a function named printAll which takes four arguments of type int.


// I will add the rest of the question in the comment


In the main function, define five variables of type int, named: first, second, third, fourth, and total. Also in the main function, define three variables of type double named: decimalOne, decimalTwo and decimalTotal

Write one function named getData which asks the user for the data and puts it in first, second, third, fourth, decimalOne, and decimalTwo. (You may copy your getData from problem I1 and make additions to manage fourth, decimalOne, and decimalTwo.) Write a function named computeTotal which can take two, or three int arguments and returns an int. Write another function, also named computeTotal which takes four int arguments and returns an int. Write another function, also named computeTotal which takes two double arguments and returns a double. Write a function named printAll which takes three arguments of type int. Write a function named printAll which takes four arguments of type int.



// I will ask the rest of the question in the comment



In the main function, define four variables of type int, named: first, second, third, and total.

Write a function named getData that asks the user to input three integers and stores them in the variables first, second, and third which are in the main function.

Write a function named computeTotal that computes and returns the total of three integers.

Write a function named printAll that prints all the values in the format shown in the following sample:

1 + 2 + 3 = 6
  

Call the other three functions from the main function.

Test it once, with the values 4, 5, and 6.



The goal of this coding exam is to quickly get you off the ground with All Syntaxes Of Event Listeners

Use the below reference image

https://assets.ccbp.in/frontend/content/dynamic-webapps/all-syntaxes-of-event-listeners-op.gif

HTML

<!DOCTYPE html>

<html>

 <head>

  </head>

 <body>

  <div class="text-center">

   <p class="message-text" id="message"></p>

   <button onclick="inlineEventListener()" class="btn-primary mb-3">

    Button with Inline event listener

   </button>

   <button id="onEventListenerBtn" class="btn-secondary mb-3">

    Button with onevent listener

   </button>

   <button id="addEventListenerBtn" class="btn-warning mb-3">

    Button with addEventListener

   </button>

  </div>

 </body>

</html>






LATEST TUTORIALS
APPROVED BY CLIENTS