Skip to main content

Posts

Lab4 : Arithmetic Operators Trigonometric Operators Bitwise Operators

Class Teedcalculator: public class Teedcalculator { public static void createMenu() { // function createMenu     /*1. Arithmetic Operators        2. Trigonometric Operators        3. Bitwise Operators */     int ch , a, b , c , d , x ;   System.out.println("You have 3 choice in menu :");   System.out.println("1 is Arithmetic Operators:");   System.out.println("2 is Trigonometric Operators:");   System.out.println("3 is Bitwise Operators:");     System.out.println("You can choose one from 1 - 3 :");     Scanner inputch= new Scanner (System.in);// Create a Scanner object      ch = inputch.nextInt(); // ch is choose         switch(ch){                 case 1:     Arithmetic arithmetic = new Arithmetic() ;//Creating Objects                ...

Lab3: Create method for class Teedcalculator that call class

Class Teedcalculator: package teedcalculator; import static teedcalculator.Oparetor.tand;// to access all static Tand of a class import static teedcalculator.Oparetor.tan;// to access all static Tan of a class import static teedcalculator.Oparetor.cost;// to access all static Cost of a class import static teedcalculator.Oparetor.cosd;// to access all static Cosd of a class import static teedcalculator.Oparetor.degree2;// to access all static Degree of a class import static teedcalculator.Oparetor.divide;// to access all static divide of a class import static teedcalculator.Oparetor.minus;// to access all static minus of a class import static teedcalculator.Oparetor.modulo;// to access all static modulo of a class import static teedcalculator.Oparetor.multiply;// to access all static multiply of a class import static teedcalculator.Oparetor.sin;// to access all static sin of a class import static teedcalculator.Oparetor.sind;// to access all static sind of a class import ...

Lab2: create sum , divide , subtract , multiplied , remainder in java

lab2_teedculculator: /*   * To change this license header, choose License Headers in Project Properties.   * To change this template file, choose Tools | Templates   * and open the template in the editor.   */ package lab2_teedculculator; /**   *   * @author HOANG LIHUO   */ import java.util.Scanner ; public class Lab2_TeedCulculator {     /**      * @ param args the command line arguments      */     public static void main(String[] args ) {         // TODO code application logic here         double a , b , sum , divide , subtract , multiplied , remainder;            Scanner input = new Scanner(System.in);         System.out.print ("a = ");        ...

Exercise Chapter7 : Vectors

VECTORS AND SCALARS: BASIC CONCEPTS Exercise 7.2 Solution : 1. For the arbitrary points A, B, C, D and E, and a single  vector which is equivalent to A:   DC + CB    = DB B:  CE + DC   = DE 2.  shows a cube. Let p =  AB, q =  AD and  r =  AE . Express the vectors representing  BD,  AC and  AG in terms of p, q and r. Consider the triangle ABD shown in Figure. We note that  BD represents the third  side of the triangle formed when AD are placed head to tail. Using the triangle law we find :                      AB + BD = AD               => BD = AD - AB                             = q - p Consider the triangle  ADC  shown in Figure. We note that  AD  represe...