Skip to main content

Featured

Adobe Experience Manager - Create an OSGI Configuration

 In this article, let's create an OSGi configuration, configure it and use it in AEM code. So now let's get started with the creation of an OSGi configuration. Technical details and Assumptions: All the following details are tested in AEM version 6.5.8, Java version 11.0.2 Creation of OSGi configuration: To create an OSGi configuration we need to create an ObjectClassDefinition. I have included a sample OCD configuration, which can be used as a reference to create one. The next step would be to create an interface and an implementation that can help fetch the OSGi configurations.  Interface: Implementation: Let's try to use the OSGi configuration created so far in Models/Servlets. For demonstration purposes, I used AEM Models here, but the same can be implemented in Servlets too. Now that we have created the OSGi configuration. Once building the code, we should be able to see the OSGi configuration in the web console (http://localhost:4502/system/console/configMgr) C...

Program for the bank details of a customer

PROGRAM:
#include<stdio.h>
#include<conio.h>
struct bank
{
int acc_num,balance;
char name[20];
}c[2];
void main()
{
int dep,with,i,acc,ch;
clrscr();
for(i=0;i<2;i++)
{
printf("Enter the name:");
scanf("%s",&c[i].name);
printf("Enter the account number");
scanf("%d",&c[i].acc_num);
printf("Enter the balance");
scanf("%d",&c[i].balance);
}
label1:clrscr();
printf("Enter the account number");
scanf("%d",&acc);
for(i=0;i<2;i++)
if(acc==c[i].acc_num)
{
label:
printf("1.Deposit\n2.Withdraw\n3.Balance enquiry\n4.Change the account number\n5.Exit\n");
scanf("%d",&ch);
switch(ch)
{
case 1:printf("\nEnter the amount to be deposited\t");
       scanf("%d",&dep);
       c[i].balance+=dep;
       goto label;
case 2:printf("\nEnter the amount to be withdrawed\t");
       scanf("%d",&with);
       c[i].balance-=with;
       goto label;
case 3:printf("\nYour balance is %d",c[i].balance);
       goto label;
case 4:goto label1;
case 5:printf("Thanks Welcome Again!!!");
       getch();
       exit(0);
}
}
}

 
OUTPUT

 

Comments

Popular Posts