Inheritance snippet – Shape (Java)
April 27, 2016//******************* Shape.java ******************* public class Shape { private int x; private int y; private String color; private String shape; Shape(){... View Article
//******************* Shape.java ******************* public class Shape { private int x; private int y; private String color; private String shape; Shape(){... View Article
//******************* Vehicle.java ******************* public class Vehicle { private String PNo; private int CNo; Vehicle(){ System.out.println("Vehicle() "); PNo = "NA"; CNo... View Article
//******************* Employee.java ******************* public class Employee { private int ID; private int Salary; private String Name; public Employee(int ID, int... View Article
public class Main { //Keywords : Try, catch, finally, throw, throws public static void main(String[] args) { //Throwable class is... View Article
import java.util.Random; public class Emp { //To get a unique employee id i.e. it doesn't starts with 0 static private... View Article
public class Collection { public static void main( String [] args){ int [] arr, arr1; //int arr []; is also... View Article
public class BankAccount{ //Data members are called as states of object private int accNumber; private String accName; private int accBalance;... View Article
/* Write a program for Matrix Multiplication using multicore programming. */ #include<iostream> #include<pthread.h> using namespace std; int MAT1[10][10],MAT2[10][10],MAT3[10][10]; int r1=3,c1=3,r2=3,c2=3;... View Article
Write object oriented program using C++ for passing command line arguement to thread functions and using command line arguement to determine number of threads to be created. Use multicore programming.
#include <iostream> #include <stdlib.h> #include <pthread.h> #include <semaphore.h> using namespace std; pthread_mutex_t status; sem_t empty,full; int buffer[50],x,item; void initialization() {... View Article