Friday, January 18, 2019

Conversion of string program java



Conversion of string java program UPPER lower BOLD ITALIC 

import javax.swing .* ;
import java.awt . * ;
import java.awt.event .* ;

class Convt extends JFrame implements ActionListener
{
       JLabel l1;
       JButton b1,b2,b3,b4;
       JTextField t1,t2,t3,t4,t5;
     Convt( )
  {
         setVisible(true);
         setSize(400,400);
         setTitle("Conversion of Text");

         l1=new JLabel("ENTER   THE   STRING :=");
         b1=new JButton("LOWER");
         b2=new JButton("UPPER");
         b3=new JButton("BOLD");
         b4=new JButton("ITALIC");
         b1.addActionListener(this);
         b2.addActionListener(this);
         b3.addActionListener(this);
         b4.addActionListener(this);

         t1=new JTextField(10);
         t2=new JTextField(10);
         t3=new JTextField(10);
         t4=new JTextField(10);
         t5=new JTextField(10);

     JPanel p1=new JPanel( );
      p1.setLayout(new GridLayout(5,2));
      p1.add(l1);
      p1.add(t1);
      p1.add(b1);
      p1.add(t2);
      p1.add(b2);
      p1.add(t3);
      p1.add(b3);
      p1.add(t4);
      p1.add(b4);
      p1.add(t5);

     Container cn=getContentPane( );
     cn.setLayout(new FlowLayout( ));
     cn.add(p1);
   }
    public void actionPerformed(ActionEvent ae)
    {
             String s=t1.getText( );
            if(ae.getSource( )==b1)
        {
             t2.setText(s.toLowerCase( ));
           }
       else
           if(ae.getSource( )==b2)
           {
                 t3.setText(s.toUpperCase( ));
                }
       else
          if(ae.getSource( )==b3)
          {
                 t4.setFont(new Font("Dialog",Font.BOLD,20));
                 t4.setText(s);
               }

        else
             if(ae.getSource( )==b4)
            {
                   t5.setFont(new Font("Dialog",Font.ITALIC,20));
                   t5.setText(s);
                 }
        }
      public static void main(String args[])
      {
             Convt cv=new Convt( );
             cv.validate( );
           }
    }


Write a command line program for line editor of practcal slip



/*
    slip-7
1. Write a command line program for line editor. The file to be edited is taken
 as command line argument, an empty  file is opened for editing if no argument
 is supplied.  It should display '$' prompt to accept the line editing commands.
Implement the following commands.
i)    a                 - to append
ii)    i  n                 - to insert after nth line
iii)    c    n1   n2              - to copy line n1 at  n2 position
iv)    c    n1, n2    n3   - to copy range of line at n3        [30 marks]

*/




#include<stdio.h>
#include<conio.h>
#include<string.h>
#define newnode (struct node *)malloc(sizeof(struct node))

struct node
{
    char line[80];
    struct node *next,*prev;
}*head=NULL;

int  length();
void print();
void append(char *line);
void load(char *);
void add();
void insert(char *,int);
void copy(int,int,int,int);





void load(char *fname)
{
    FILE *fp;
    char line[80];
    fp=fopen(fname,"r");
    if(fp==NULL)
    {
        printf("\nFile cannot boe opened..");
        getch();
        exit(0);
    }
    while(!feof(fp))
    {
        fgets(line,80,fp);
        append(line);
    }

}

void append(char *line)
{
    struct node *f,*s;
    f=newnode;
    strcpy(f->line,line);
    f->next=NULL;
    f->prev=NULL;
    if(head==NULL)
        head=f;
    else
    {
        for(s=head;s->next!=NULL;s=s->next);
        s->next=f;
        f->prev=s;
        s=s->next;
    }
}

void print()
{
    struct node *f;
    int i=1;
    for(f=head;f!=NULL;f=f->next)
        printf("%d %s",i++,f->line);
}

int length()
{
    int cnt=0;
    struct node *s;
    for(s=head;s!=NULL;s=s->next)
        cnt++;
    return cnt;
}

void insert(char *line,int from)
{
    struct node *f,*s;
    int len,i;
    if(from-1>length())
    {
        printf("\nError..");
        return;
    }

    f=newnode;
    f->next=NULL;
    f->prev=NULL;
    strcpy(f->line,line);

    if(from==1)
    {
        f->next=head;
        head->prev=f;
        head=head->prev;
        return;
    }
    else
    {
        s=head;
        for(i=1;i<(from-1);i++)
            s=s->next;
        f->next=s->next;
        s->next->prev=f;
        s->next=f;
        f->prev=s;
    }
}






main(int argc,char *argv[])
{
    int ch;
    int i,notok,from,to,range;
    char cmd[80],tok[4],line[80];
    clrscr();
    for(i=0;i<4;i++)
        tok[i]=(char )malloc(20);

    if(argc==2)
    {
        head=NULL;
        load(argv[1]);
    }
    while(1)
    {
        printf("\n?");
        flushall();
        gets(cmd);
        notok=sscanf(cmd,"%s%s%s%s",tok[0],tok[1],tok[2],tok[3]);
        switch(cmd[0])
        {
            case 'q':exit(1);

            case 'p':print();
                   break;
            case 'i':from=atoi(tok[1]);
                    printf("Input Line:");
                    flushall();
                    fgets(line,80,stdin);
                    insert(line,from);
                    break;

            case 'c':from=atoi(tok[1]);
                   to=atoi(tok[2]);
                   range=atoi(tok[3]);
                   copy(notok,from,to,range);
                   break;



        }
    }
}

void copy(int notok,int from,int to,int range)
{
    int len,i;
    struct node *s,*f,*temp;
    char line[80];
    len=length();
    if(from>len)
    {
        printf("\nError...");
        return;
    }

    if(notok==3)
    {
        s=head;
        for(i=0;i<(from-1);i++)
            s=s->next;
        insert(s->line,to);
    }

    if(notok==4)
    {
        if(to>len || range-1>len)
        {
            printf("\nError,,,");
            return;
        }
        s=head;
        for(i=0;i<(from-1);i++)
            s=s->next;
        for(i=from;i<=to && s!=NULL;i++)
        {
            insert(s->line,range++);
            s=s->next;
        }
    }
}

RoundRobin Program of practical slip



 /* Implementation of RoundRobin method for CPU scheduling using Circular LL */
 


#include<stdlib.h>
#define newnode (struct node *)malloc(sizeof(struct node))
struct node
{ int jobno,time;
  struct node *next;
}*JOBQ=NULL;


void erase()
{ struct node *S,*T;
  if(JOBQ!=NULL)
  { for(T=JOBQ;T->next!=JOBQ; T=T->next) ;  // go to last node
    T->next=NULL;

    while(JOBQ!=NULL)  { S=JOBQ;  JOBQ=JOBQ->next;  free(S);  }
  }
}

void CreateJOBQ()
{ struct node *S;   int i,n;
  printf("\nHow many jobs?"); scanf("%d",&n);


  if(JOBQ!=NULL) erase(JOBQ);
  JOBQ=newnode;
  printf("\nEnter JOB No. & execution time in sec. "); scanf("%d %d",&JOBQ->jobno,&JOBQ->time);

  S=JOBQ;
  for(i=2;i<=n;i++)
  { S->next=newnode;
    S=S->next;
    printf("\nEnter JOB No. & execution time in sec. "); scanf("%d %d",&S->jobno,&S->time);
  }
  S->next=JOBQ;
}

void DisplayJOBQ()
{struct node *T=JOBQ;
  if(JOBQ==NULL) printf("\nJOB Q is Empty!");
  else
  { printf("\nJOB  Rem. Time");
    do{ printf("\n J%d : %d ",T->jobno,T->time);
    T=T->next;
      }while(T!=JOBQ);
  }
}

void ExecuteJOBQ()
{ struct node *T=JOBQ,*S=NULL,*t1;  int flag,timeslot=1,time=0; char choice;
  printf("\nEnter Time Slot (in sec.) "); scanf("%d",&timeslot);
  printf("\nclock CPU   JOBQ ");
  while(JOBQ!=NULL)
  {
    do{ flag=0;
    if(T->time<=timeslot)  // job remaining time < time slot
    { printf("\n%3d  J%d(%d) |--",time,T->jobno,T->time); // cpu allocated
      for(t1=T->next; t1!=T; t1=t1->next) printf(" J%d(%d) ",t1->jobno,t1->time);  // print JOBQ
      time+=T->time; // increment clock
      T->time=0; // job finished, delete from JOBQ
      if(T==JOBQ) // 1st job
      { if(JOBQ->next==JOBQ) // only 1 job in Q
        { JOBQ=NULL; free(T); T=NULL; } // JOBQ became empty
        else  // more jobs in Q
        {  for(t1=JOBQ;t1->next!=JOBQ; t1=t1->next) ;  // go to last node
           JOBQ=JOBQ->next;   t1->next=JOBQ;
           free(T);     T=JOBQ; flag=1;
        }
      }
      else // job other than 1st position
      {   S->next=T->next; free(T);  T=S->next;
      }

    }
    else  // job is executed for given time slot
    {  printf("\n%3d  J%d(%d) |--",time,T->jobno,T->time); // cpu allocated
       for(t1=T->next; t1!=T; t1=t1->next) printf(" J%d(%d) ",t1->jobno,t1->time); // print JOBQ

       T->time-=timeslot;
       time+=timeslot;
       S=T; T=T->next;  // go to next job
    }

    printf(" --|  Add New Job(y/n)? ");  choice=getche();
    if(choice=='y' || choice=='Y')
    { struct node *S1;
      if(JOBQ==NULL) // JOBQ empty
      { JOBQ=newnode; JOBQ->next=JOBQ;    // 1st job in Q
        printf("\nEnter JOB No. & execution time in sec. "); scanf("%d %d",&JOBQ->jobno,&JOBQ->time);
        T=JOBQ; flag=1;
      }
      else
      { for(S1=S;S1->next!=S; S1=S1->next) ;  // go to last node of JOBQ
        S1->next=newnode; S1=S1->next; S1->next=S;    // add new job at the end of JOBQ
        printf("\nEnter JOB No. & execution time in sec. "); scanf("%d %d",&S1->jobno,&S1->time);
      }
    }
      }while(T!=JOBQ || flag);
  }
  printf("\n%3d  -idle-",time);
}

char menu()
{ char choice='a';
  clrscr();
  printf("----- Round Robin ------");
  printf("\nC: Create New JOB Queue");
  printf("\nD: Display JOB Queue");
  printf("\nE: Execute JOB Queue");
  printf("\nX: exit");
  printf("\nEnter your choice : ");
  choice=getche();
  return toupper(choice);
}

void main()
{
  while(1)
  { switch(menu())
    { case 'X' : erase(); exit(0);  // release memory allocated to JOBQ
      case 'C' : CreateJOBQ();  break;
      case 'D' : DisplayJOBQ(); break;
      case 'E' : ExecuteJOBQ(); break;
      default  : printf("\7 Invalid Choice!");
    }
    printf("\npress any key to continue...");
    getch();
  }

}

Earning Money


To earn money is not so easy for everyone it depends on factors
Time
Age
Smartness
Luck
Legacy 

If you want to earn money make proper investments at proper time and at proper place.
Money word says itself:
M - Move
O - Overcome
N - Noble
E -  Energy
Y - Your true value

Earning money should have mind to solve problem which can be generated by creativity to produce a product which is problem solving product.
One will give you money only when he wants his work to be done for that money. One should be experienced in the work which he or she is doing to earn money with doing his marketing.
Money can be earned on :
Seconds basis,
Minutes basis,
Hourly basis,
Daily basis,
Weekly basis,
Monthly basis,
Quarterly basis,
Yearly basis

 It is done by
Manufactured basis,
Selling basis ,
Service basis,
Job basis,
Physical basis,
Mental basis,
Consulting basis,
Mode basis,
Salary basis,
Share market basis,
Interest basis,
Commission  basis

Make study and expert in the field by Blue Ocean Strategy so that you can make money easily on the market. think abut the future what are important and give priority to them accordingly.
Adopt technology and should be easily move with generation otherwise you will stay behind.
Make a statistical study in each of the cases.

Wednesday, January 9, 2019

DOCUMENTATION - POLICY CONDITION



DOCUMENTATION - POLICY CONDITION

Question 1
Which of the below statement is false with regards to nomination?
I. Policy nomination is not cancelled if the policy is assigned to the insurer in
return for a loan
II. Nomination can be done at the time of policy purchase or subsequently
III. Nomination can be changed by making an endorsement in the policy
IV. A nominee has full rights on the whole of the claim

Question 2
In order for the policy to acquire a guaranteed surrender value, for how long
must the premiums be paid as per law?
I. Premiums must be paid for at least 2 consecutive years
II. Premiums must be paid for at least 3 consecutive years
III. Premiums must be paid for at least 4 consecutive years
IV. Premiums must be paid for at least 5 consecutive years

Question 3
When is a policy deemed to be lapsed?
I. If the premiums are not paid on due date
II. If the premiums are not paid before the due date
III. If the premium has not been paid even during days of grace
IV. If the policy is surrendered

Question 4
Which of the below statement is correct with regards to grace period of an
insurance policy?
I. The standard length of the grace period is one month.
II. The standard length of the grace period is 30 days.
III. The standard length of the grace period is one month or 30 days.
IV. The standard length of the grace period is one month or 31 days.

Question 5
What will happen if the policyholder does not pay the premium by the due date
and dies during the grace period?
I. The insurer will consider the policy void due to non-payment of premium by
the due date and hence reject the claim
II. The insurer will pay the claim and waive off the last unpaid premium
III. The insurer will pay the claim after deducting the unpaid premium
IV. The insurer will pay the claim after deducting the unpaid premium along
with interest which will be taken as 2% above the bank savings interest rate

Question 6
During the revival of a lapsed policy, which of the below aspect is considered
most significant by the insurance company? Choose the most appropriate option.
I. Evidence of insurability at revival
II. Revival of the policy leading to increase in risk for the insurance company
III. Payment of unpaid premiums with interest
IV. Insured submitting the revival application within a specified time frame

Question 7
For an insurance policy nomination is allowed under _________ of the Insurance
Act, 1938.
I. Section 10
II. Section 38
III. Section 39
IV. Section 45

Question 8
Which of the below statement is incorrect with regards to a policy against which
a loan has been taken from the insurance company?
I. The policy will have to be assigned in favour of the insurance company
II. The nomination of such policy will get cancelled due to assignment of the
policy in favour of the insurance company
III. The nominee’s right will affected to the extent of the insurer’s interest in
the policy
IV. The policy loan is usually limited to a percentage of the policy’s surrender
value

Question 9
Which of the below statement is incorrect with regards to assignment of an
insurance policy?
I. In case of Absolute Assignment, in the event of death of the assignee, the
title of the policy would pass to the estate of the deceased assignee.
II. The assignment of a life insurance policy implies the act of transferring the
rights right, title and interest in the policy (as property) from one person to
another.
III. It is necessary that the policyholder must give notice of assignment to the
insurer.
IV. In case of Absolute Assignment, the policy vests absolutely with the assignee
till maturity, except in case of death of the insured during the policy
tenure, wherein the policy reverts back to the beneficiaries of the insured.

Question 10
Which of the below alteration will be permitted by an insurance company?
I. Splitting up of the policy into two or more policies
II. Extension of the premium paying term
III. Change of the policy from with profit policy to without profit policy
IV. Increase in the sum assured

Question 11
Under what circumstances would the policyholder need to appoint an
appointee?
I. Insured is minor
II. Nominee is a minor
III. Policyholder is not of sound mind
IV. Policyholder is not married

Solved DOCUMENTATION – POLICY STAGE

Solved DOCUMENTATION – POLICY STAGE


Solve Answer of DOCUMENTATION – PROPOSAL STAGE


CHAPTER

 DOCUMENTATION – PROPOSAL STAGE

Question 1
Which of the below is an example of standard age proof?
I. Ration card
II. Horoscope
III. Passport
IV. Village Panchayat certificate
Answer: III. Passport

Question 2
Which of the below can be attributed to moral hazard?
I. Increased risky behavior following the purchase of insurance
II. Increased risky behavior prior to the purchase of insurance
III. Decreased risky behavior following the purchase of insurance
IV. Engaging in criminal acts post being insured
Answer: I. Increased risky behavior following the purchase of insurance

Question 3
Which of the below features will be checked in a medical examiner’s report?
I. Emotional behavior of the proposer
II. Height, weight and blood pressure
III. Social status
IV. Truthfulness
Answer: II. Height, weight and blood pressure

Question 4
A __________ is a formal legal document used by insurance companies that
provides details about the product.
I. Proposal form
II. Proposal quote
III. Information docket
IV. Prospectus
Answer: IV. Prospectus

Question 5
The application document used for making the proposal is commonly known as
the __________.
I. Application form
II. Proposal form
III. Registration form
IV. Subscription form
Answer: II. Proposal form

Question 6
From the below given age proof documents, identify the one which is classified
as non-standard by insurance companies.
I. School certificate
II. Identity card in case of defence personnel
III. Ration card
IV. Certificate of baptism
Answer: III. Ration card

Question 7
Money laundering is the process of bringing _______ money into an economy by
hiding its _______ origin so that it appears to be legally acquired.
I. Illegal, illegal
II. Legal, legal
III. Illegal, legal
IV. Legal, illegal
Answer: I. Illegal, illegal

Question 8
In case the policyholder is not satisfied with the policy, he / she can return the
policy within the free-look period i.e. within ________of receiving the policy
document.
I. 60 days
II. 45 days
III. 30 days
IV. 15 days
Answer: IV. 15 days

Question 9
Which of the below statement is correct with regards to a policy returned by a
Policyholder during the free look period?
I. The insurance company will refund 100% of the premium
II. The insurance company will refund 50% of the premium
III. The insurance company will refund the premium after adjusting for
Proportionate risk premium for the period on cover, medical examination
Expenses and stamp duty charges
IV. The insurance company will forfeit the entire premium
Answer: III. The insurance company will refund the premium after adjusting for
Proportionate risk premium for the period on cover, medical examination
Expenses and stamp duty charges

Question 10
Which of the below is not a valid address proof?
I. PAN Card
II. Voter ID Card
III. Bank passbook
IV. Driving license
Answer: II. Voter ID Card

Question 11
During the _________ period, if the policyholder has bought a policy and does
not want it, he / she can return it and get a refund.
I. Free evaluation
II. Free look
III. Cancellation
IV. Free trial

Answer: II. Free look

What is customer service



What is customer service?
Customers provide the bread and butter of a business and no enterprise can afford to treat them indifferently.
What the customer really derives is a service experience.
If this is less than satisfactory , it causes dissatisfaction. If the service exceeds expectations, the customer would be delighted.
The goal of every enterprise should thus be to delight its customers.


Quality of service
It is necessary for companies and their personnel, which includes their agents , to render high quality service and delight the customer.


High quality service and attributes

A well-known model on service quality  [named "SERVQUAL'] would give us some insights.
It highlights five major indicators of service quality:

a) Reliability : the ability to perform the promised service dependably and accurately .
 Most customers regard reliability as being the most important of the five dimensions of service quality.
It is the foundation on which trust is built.
b) Responsiveness: refers to the willingness and ability of service personnel to help customers and provide prompt response to the customers needs.
It may be measured by indicators like speed , accuracy and attitude while giving the service.
c) Assurance : refers to the knowledge , competence and courtesy of service providers and their ability to convey trust and confidence.
It is given by the customers evaluation of how well the service employee has understood needs and is capable of meeting them.
d) Empathy : is described as the human touch. It is reflected in the caring attitude and individualized attention provided to customers.
e) Tangibles : represent the physical environmental factors that the customers can see, hear and touch .
For instance the location , the layout and cleanliness and the sense of order and professionalism that one gets when visiting an insurance company's office can make a great impression on the customer .
The physical ambiance becomes especially important because it creates first and lasting impression , before and after the actual service is experienced.


Definition
Service means service of any description which is made available to potential users and includes the provision of facilities in connection with banking ,financing, insurance , transport , processing , supply of electrical or other energy,
board or lodging or both housing construction , entertainment , amusement or the purveying of news or other information .
But it does not include the rendering of any service free of charge or under a contract of personal service.

Tuesday, January 8, 2019

WHAT IS A SINKING FUND


WHAT IS A SINKING FUND?
A sinking fund is a part of a bond indenture or preferred stock charter that requires the issuer to regularly set money aside in a separate custodial account for the exclusive purpose of redeeming the bonds or shares.

let's assume company ABC issues $10 million of bonds that mature in 10 years.
If the bonds have a sinking fund, company ABC might be required to retire, say, $1 million of the bonds each year for 10 years.
To do so, company ABC must deposit $1 million each year into a sinking fund, which is separate from its operating funds and is used exclusively to retire this debt.
 This strategy ensures that company ABC will pay off the $10 million in 10 years

Establishing a Sinking Fund
When creating a sinking fund, the issuer sets up a custodial account and makes systematic payments into it. Payments might not begin until several years have passed. Amounts are typically fixed, although variable amounts may be allowed based on earnings levels or other criteria set by the fund's provisions. Unless preferred stock is used with sinking funds, failure to make scheduled principal and interest payments results in defaulting on the loan.

Advantages and Disadvantages of a Sinking Fund
A sinking fund improves a corporation's creditworthiness, letting the business pay investors a lower interest rate. Because of the interest savings, the corporation has more net income and cash flow for funding operations. Also, businesses may deduct interest payments given to lenders from their taxes, helping increase cash flow as well. Corporations may use the savings for covering sinking fund payments or other obligations. In addition, investors appreciate the added protection a sinking fund provides, making investors more likely to lend a company money. A business that is controlling its money is less likely to default on outstanding debt.

However, if interest rates decrease and bond prices increase, bonds may be called and investors may lose some of their interest payments, resulting in less long-term income. Also, investors may have to put their funds elsewhere at a lower interest rate, also missing out on potential long-term income.

Featured posts

Happy Independence Day August 15th

 Here's a message for India's Independence Day (August 15th): "शुभ स्वतंत्रता दिवस! आजादी की 79वीं वर्षगांठ पर, आइए हम अपने देश...

Popular posts