Mar 19, 2018

What is Java Virtual Machine (JVM)?

Java  Virtual   Machine  (JVM) is an abstract machine that executes Java  Bytecode. There are different  JVM for different hardware and software platforms.  So JVM is platform dependent.  JVM  is responsible for loading, verifying and executing the Bytecode on a platform.

Mar 18, 2018

What is the difference between JDK and JRE?

JDK stands for Java  Development Kit.  It contains the tools and
libraries for development of Java programs.  It also contains
compilers and debuggers needed to compile Java program.


JRE stands for Java Runtime Environment. This is included in JDK.
JRE provides libraries and  JVM that is required to run a Java
program.

Its currently owned by Oracle.

http://www.oracle.com/technetwork/pt/java/javase/overview/index.html 

Oct 22, 2017

C# Program to write Class average with counter-controlled repetition.

The class average is equal to the sum of the grades divided by the number of students. The
algorithm for solving this problem on a computer must input each of the grades, perform
the averaging calculation and display the result.



1 //
2 // Class average with counter-controlled repetition.
3
4 usingSystem;
5
6 classAverage1
7 {
8 static voidMain( string[] args )
9 {
10   inttotal,  // sum of grades
11 gradeCounter,  // number of grades entered
12 gradeValue,  // grade value
13 average;  // average of all grades
14
15 // initialization phase
16 total = 0;  // clear total
17 gradeCounter = 1;  // prepare to loop
18
19 // processing phase
20   while( gradeCounter <= 10)  // loop 10 times
21 {
22   // prompt for input and read grade from user
23 Console.Write( "Enter integer grade: ");
24
25   // read input and convert to integer
26 gradeValue = Int32.Parse( Console.ReadLine() );
27
28   // add gradeValue to total
29 total = total + gradeValue;
30
31   // add 1 to gradeCounter
32 gradeCounter = gradeCounter + 1;
33 }
34
35 // termination phase
36 average = total / 10; // integer division
37
38 // display average of exam grades
39 Console.WriteLine( "\nClass average is {0}", average );
40
41 } // end Main
42
43 }// end class Average1

Oct 6, 2017

What is SCAMPER Technique ?

Generating new ideas is not easy. Fortunately, a technique known as SCAMPER can be invaluable. Select a small team of between three and six people to assist you with your search for new ideas. Choose people from different disciplines and levels within the organisation.


Using the SCAMPER search for new ideas, ask whether we can:


  1.  Substitute: existing components, machines or human resources to improve the product.
  2. Combine:one or more of the products functions. Reconfigure how we use the human and material resources to improve how people see the product and its uses.
  3. Adapt: the product for use in a different context
  4. Modify: the size, shape, feel, texture, smell or functionality of the product. Which existing features could be enhanced to create more value in the product and make it more attractive to customers?
  5. Find another use for the product: You only have to think about the multiple uses that simple everyday objects, such as a brick or paperclip, can be put to realise that we seldom exploit all the uses of even common products.
  6. Eliminate any elements: of the product, process or change and simplify it without adversely affecting its effectiveness or appeal to customers. For example, mobile-phone manufacturers now realise that there is a market for chunky phones with big buttons and limited functionality for the older consumer.
  7. Reverse: or invert long-held ideas about how the product is made or marketed.


Good companies will meet needs. Great companies will create markets- PHILIP KOTLER

Philip Kotler (b. 1931) is an American Management author and consultant who has written over 50 +  books on marketing. He is also Professor of International Marketing at the Kellogg School of Management at Northwestern University, Illinois.

He says that " Good companies will meet needs. Great companies will create markets."



  •  Identify new or improved products which may develop into a new market.
  • When thinking about new markets you must decide which industry-wide standards:
    •  can be ignored/eliminated;
    • should be reduced below the current accepted norm in the industry;
    • should be raised above the current accepted norm in the industry;
    • can be created in the industry for the first time and offered to customers.
  • When considering the above questions, it’s essential that customer value drives the discussion not how the competition is going to react. In your blue ocean, there will be no competitors if you get it right (at least initially).
  • Start by identifying potential blue oceans in which the risks are minimised. What you are doing is risky enough without operating in a risky sector.
  • Think in big-picture terms
  • Focus on building a strong business model that will ensure a long-term profit. Work up the costs and cash flows of everything in as much detail as possible.
  • To minimise opposition, involve staff when planning and ensure that you maintain great communication with them at all time.

Sep 19, 2017

A business exists to create [and retain] a customer- Peter Drucker

Ask most people what the primary purpose of a business is and they’ll say either, ‘To make a profit’ or ‘To maximise profits’. Peter Drucker (1909–2005), perhaps the only true genius that the discipline of management has produced, challenges this view. He argues that Despite the need to win and retain customers, it is still the case that far too many organisations see customers, and their complaints, as annoying distractions from the real work of the organisation. The truth is that there are only two enterprises that can treat their customers with contempt and still prosper – drug dealing and football clubs.

WHAT TO DO
Unless you have already done so, re-orientate your thinking. Stop obsessing over profits and start to think about how you can improve the service you offer customers. Satisfied customers will tell their friends about you. Dissatisfied customers will tell everyone!
Treat existing customers as the valuable assets they are and not the annoying nuisance that many staff consider them to be.
Train all your staff to recognise that customers are the organisation’s most precious assets and should be treated as such. This applies as much to the accounting staff chasing a debt as the sales staff pushing a new product.
The main reason customers change suppliers is that they feel underappreciated and exploited. This is hardly surprising if you consistently offer new customers better deals than you do to existing customers. No one wants to feel exploited. Never offer better deals to new customers than those offered to existing customers – regardless of what your marketing team says about expanding market share.
Keep in touch with customers. Use email, phone, newsletters and personal visits to improve and maintain your relationship. On these occasions don’t try to sell anything. Just try to create a relationship of trust.
To build trust, always keep your word. Don’t renege on a deal or a promise even if it means you lose money. If you fail to deliver on your word you’ll lose the person’s trust and probably their custom.
Be frank with customers. If there’s a problem or a delay, tell them. If you can’t answer a question, don’t invent one. Tell them you don’t know but that you’ll find out and get back to them.
Listen to what customers say. Use their feedback to improve existing products and as a source of ideas for new and/or improved products.
In particular, pay attention to what your customers say about your competitors. Avoid the mistakes your competitors make and don’t hesitate to steal their good ideas and practice. In particular, pick up any intelligence you can about new or improved products that your competition are developing and feed it back to your organisation.
Reward customer loyalty and prompt payment by offering selected customers higher discounts, better payment terms, special deals and invitations to special events

Aug 31, 2017

How to write a program for calendar in Java

calendar for a given month of a given year, or of the current month and year.

import java.util.*;
import java.text.*;
/** Print a month page.
* Only works for the Western calendar.
*/
public class CalendarPage {
/** The names of the months */
String[] months = {
"January", "February", "March", "April",
"May", "June", "July", "August",
"September", "October", "November", "December"
};
/** The days in each month. */
public final static int dom[] = {
31, 28, 31, 30, /* jan feb mar apr */
31, 30, 31, 31, /* may jun jul aug */
30, 31, 30, 31 /* sep oct nov dec */
};
/** Compute which days to put where, in the Cal panel */
public void print(int mm, int yy) {
/** The number of days to leave blank at the start of this
month */
int leadGap = 0;
System.out.print(months[mm]); // print month and year

System.out.print(" ");
System.out.print(yy);
System.out.println( );
if (mm < 0 || mm > 11)
throw new IllegalArgumentException("Month " + mm + " bad,
must be 0-11");
GregorianCalendar calendar = new GregorianCalendar(yy, mm, 1);
System.out.println("Su Mo Tu We Th Fr Sa");
// Compute how much to leave before the first.
// getDay( ) returns 0 for Sunday, which is just right.
leadGap = calendar.get(Calendar.DAY_OF_WEEK)-1;
int daysInMonth = dom[mm];
if (calendar.isLeapYear(calendar.get(Calendar.YEAR)) && mm ==
1)
++daysInMonth;
// Blank out the labels before 1st day of month
for (int i = 0; i < leadGap; i++) {
System.out.print(" ");
}
// Fill in numbers for the day of month.
for (int i = 1; i <= daysInMonth; i++) {
// This "if" statement is simpler than fiddling with
NumberFormat
if (i<=9)
System.out.print(' ');
System.out.print(i);
if ((leadGap + i) % 7 == 0) // wrap if end of line.
System.out.println( );
else
System.out.print(' ');
}
System.out.println( );
}
/** For testing, a main program */
public static void main(String[] av) {
int month, year;
CalendarPage cp = new CalendarPage( );
// print the current month.
if (av.length == 2) {
cp.print(Integer.parseInt(av[0])-1,
Integer.parseInt(av[1]));
} else {
Calendar c = Calendar.getInstance( );
cp.print(c.get(Calendar.MONTH), c.get(Calendar.YEAR));
}
}
}