Answer:
import java.util.Scanner;
class Main {
public static void main (String args[])
{
Scanner input = new Scanner(System.in);
VendingMachine machine = new VendingMachine(20);
System.out.print("Enter nr to purchase: ");
int nrPurchased = input.nextInt();
System.out.print("Enter nr to re-stock: ");
int nrRestock = input.nextInt();
machine.Transaction(nrPurchased, nrRestock);
input.close();
}
}
class VendingMachine {
private int inventory;
public VendingMachine(int initialInventory) {
inventory = initialInventory;
}
public void Transaction(int nrToBuy, int nrToRestock) {
inventory += nrToRestock - nrToBuy;
System.out.printf("Inventory: %d bottles.\n", inventory);
}
}
Answer:
Explanation:
#include <stdio.h>
#include <string.h>
typedef struct ProductInfo_struct {
char itemName[30];
int itemQty;
} ProductInfo;
ProductInfo IncreaseItemQty (ProductInfo productToStock, int increaseValue) {
productToStock.itemQty = productToStock.itemQty + increaseValue;
return productToStock;
}
int main(void) {
ProductInfo mugInfo;
int addStock;
addStock = 10;
scanf("%s", mugInfo.itemName);
scanf("%d", &mugInfo.itemQty);
**** /* Your solution goes here */ ****
printf("Name: %s, stock: %d\n", mugInfo.itemName, mugInfo.itemQty);
return 0;
}
Technology has helped tremendously business professionals to be more efficient.
2. Business professionals work on the basis of information . Management information is available at the click of the mouse.
3. Communication, within and outside the organisation, has become very easy.
4. Controls on Accounts has become more efficient and less tedious.
5. Work drudgery has been given a go by. Technology has given more free time which can be used for thinking and planning.
Negative numbers are encoded using the two’s complement technique. Two's complement is used to encode negative numbers.
Option A is correct .
<h3>What method does the in data type use to store negative numbers?</h3>
Most implementations you're likely to encounter store negative signed integers in a form known as two's complement. Another important way of storing negative signed numbers is called one's complement. The one's complement of an N-bit number x is basically defined as x with all bits inverted.
<h3>What is encoding method?</h3>
An encoding technique is the application of established industry conventions to a coded character set to create a coded character scheme. Such rules determine the number of bits required to store the numeric representation of a given character and its code position in the encoding.
Learn more about two complement technique encoding :
brainly.com/question/26668609
#SPJ4
Advertising is a paid promotion that uses strategic planning to target a certain audience. The seven functions of marketing is promotion, selling, product management, marketing information management, pricing, financing, and distribution. Usually you see common advertising such as digital ads, billboards, newspapers, flyers, and more. Advertising can spread awareness, popularize a brand, increase customer demand, and company profits. Advertising is necessary for most- if not all- companies including media outlets, the television industry, search engine companies, and social media websites.