banner

Monday, October 31, 2016

ASSESSMENT EXERCISES - FIRST BATCH

First question carries 5 marks and second question carries 10 marks . Create a class called Invoice that a hardware store might use t... thumbnail 1 summary


First question carries 5 marks and second question carries 10 marks.
  1. Create a class called Invoice that a hardware store might use to represent an invoice for an item sold at the store. An Invoice should include four pieces of information as instance variables‐a part number(type String),a part description(type String),a quantity of the item being purchased (type int) and a price per item (double). 
    1. Your class should have a constructor that initializes the four instance variables. Provide a set and a get method for each instance variable. 
    2. In addition, provide a method named getInvoiceAmount that calculates the invoice amount (i.e., multiplies the quantity by the price per item), then returns the amount as a double value. 
    3. If the quantity is not positive, it should be set to 0. If the price per item is not positive, it should be set to 0.0. 
    4. Write a test application named InvoiceTest that demonstrates class Invoice’s capabilities.
  2. Write a Java applet program that works as a simple calculator. Use a grid layout to arrange buttons for the digits and for the + – * % operations. Add a text field to display the result. The output should look as the following screenshot. 



import java.awt.*;
import java.awt.event.*;
import java.applet.*;
/*<applet code="Cal" width=300 height=300></applet>*/

Thursday, October 27, 2016

LAB ASSIGNMENT

Today we will build a simple java GUI application as an assignment. For this application you will be making use of the GUI builder features... thumbnail 1 summary
Today we will build a simple java GUI application as an assignment. For this application you will be making use of the GUI builder features of the NetBeans IDE.This will be considered as an assignment for PMC 1622 course. On successful completion of this task you will be awarded 10 marks. Marks will be given based on the time taken to complete this task. Once you finish the task please demonstrate it at the earliest opportunity(In this lab session itself).



To get the Instructions for completing this assignment click on this link.

REVISED MARKS DISTRIBUTION

Following is the revised assessment of PMC 1622 based on our discussions      Lab Exercises     : 15 (5 + 10)      Lab Assignment : 10... thumbnail 1 summary
Following is the revised assessment of PMC 1622 based on our discussions

  •      Lab Exercises     : 15 (5 + 10)
  •      Lab Assignment : 10 
  •      Lab Record         : 10
  •      Attendance          : 5
  •      Project Work :      60
    • Individual Contribution : 30
    • Overall                              : 30
TOTAL : 100 MARKS

Friday, October 21, 2016

LIST OF PROGRAMMING EXERCISES

Ask the user to enter two integers and print their sum, product, difference and quotient  Read a string from the keyboard, and output t... thumbnail 1 summary
  1. Ask the user to enter two integers and print their sum, product, difference and quotient 
  2. Read a string from the keyboard, and output the string twice in a row, first all uppercase and next all lowercase.
  3. Check if a string is a palindrome or not
  4. Find the missing numbers in an  array
  5. Return the average of the marks in an array
  6. Create a SavingsAccount class and test its methods.
  7. Create a Employee Class and compute the salary.
  8. Inherit the car class and compute the selling price for various models
  9. Create a simple calculator with Applet
  10. Convert the temperature from one scale to another using Applet.

Thursday, October 20, 2016

PE10 : Temperature Conversion Using APPLET

a)Write a temperature conversion applet that converts from Fahrenheit to Celsius . The Fahrenheit temperature should be entered from the... thumbnail 1 summary
a)Write a temperature conversion applet that converts from Fahrenheit to Celsius. The Fahrenheit temperature should be entered from the keyboard (via a TextField). A Label should be used to display the converted temperature. Use the following formula for the conversion:
Celcius = ((5/9)*(Ferenheit‐32)).

more challenge ..

b.) Enhance the temperature conversion applet by adding the Kelvin temperature scale. The applet should also allow the user to make conversions between any two scales. Use the following formula for the conversion between Kelvin and Celsius : 
Kelvin = Celcius + 273.15




AN IDEAL OUTPUT SHOULD LOOK LIKE THIS


Note : You may use Java SWING objects as well to accomplish the task. 


FIRST CONTINUOUS ASSESSMENT ON OCT 31, 2016

Dear Students,     First assessment of  your Java lab  performance for  the calculation of  internal marks will be held on October 31,... thumbnail 1 summary
Dear Students,

    First assessment of  your Java lab  performance for  the calculation of  internal marks will be held on October 31, 2016. As per the published CARS and CADL criteria we will be conducting first activity in the CARS (Programming Exercises)  based on the exercises you have done till now in the lab sessions (including today's). Questions will be of similar nature (Will not be the exact ones).

Also prepare for a Viva-Voce(CADL) of the topics covered till October 28, 2016 on the same day.

For marks distribution refer the previously posted table of CARS and CADL



Monday, October 17, 2016

PE9 : SIMPLE CALCULATOR USING APPLET

Write a Java program that works as a simple calculator . Use a grid layout to arrange buttons for the digits and for the + – * % operation... thumbnail 1 summary
Write a Java program that works as a simple calculator. Use a grid layout to arrange buttons for the digits and for the + – * % operations. Add a text field to display the result.



import java.awt.*;
import java.awt.event.*;
import java.applet.*;
/*<applet code="Cal" width=300 height=300></applet>*/

Thursday, October 6, 2016

Programming with NetBeans IDE

Session Objectives Get familiar with programming in NetBeans IDE. Migrate all your java programs done till now to NetBeans. Creat... thumbnail 1 summary

Session Objectives
  • Get familiar with programming in NetBeans IDE.
  • Migrate all your java programs done till now to NetBeans.
    • Create individual projects for each programs and name them as PE1, PE2....PE8
    • For programs with multiple classes create different java files corresponding to each class in the same project 
    • For the time being keep the package name as default 
    • Individually compile each file 
    • Run the file containing the 'main' class to get the required output. 
  • Learn to debug the program using the IDE debugger.

For  learning more in detail about the NetBeans IDE, download the following eBook.

https://drive.google.com/file/d/0B5_k_BrjMqPHSHNuZS1oYmN0cnc/view?usp=sharing