7/23/2016

DCT1093 OOP. Assignment 1

You are required to provide:-

(i) Algorithm (Flowchart or  Pseudocode)  for each the following problems.


1.      Write a program that prompts the user to enter the width and height of a rectangle and displays the perimeter and area. Here is a sample run:

Enter the width of a rectangle: 5.25
Enter the height of a rectangle:  9.26

The perimeter is 29.02
The area is 48.62


2.SATU Terengganu charges the following rates for its customer:-

Penggunaan
Caj
Minima (RM)
Kuantiti M3
(Meter Padu)
Caj
Setiap M3
0 - 20.00
RM0.42
RM4.00 sebulan
20.1 - 40.00
RM0.65
40.1 - 60.00
RM0.90
60.1 ke atas
RM1.00

Input the amount of water used and calculate the net amount for a customer.

7/13/2016

DCT1093 OOP Contoh Quiz 1

Write an algorithm (pseudo code OR flowchart) and java program to input  the radius and length of a cylinder and computes its volume using the following formulas:

area = radius * radius * 3.14159
volume = area * length




Solution ( Java Program)

import java.util.Scanner;
public class lab1q1 {
   
    public static void main(String[] args) {
       
        // TODO, add your application code
         Scanner input = new Scanner(System.in);
        System.out.println("Please enter radius and length");
        double radius = input.nextDouble();
        double length = input.nextDouble();
        double area, volume;
        area = radius * radius * 3.14159;
        volume = area * length;
        System.out.println("Volume =");
        System.out.println(volume);
    }
}



DCT1093 OOP LAB 1

Write an algorithm (Flowchart) for the following problems:-

1. Write program that calculates mileage reimbursement for a salesperson at a rate of RM 0.65 per kilometer. Your program should interact with the user in this manner :




MILEAGE REIMBURSEMENT CALCULATOR
Enter beginning odometer reading: 13505
Enter ending odometer reading: 13810
You traveled 305.4 kilometers. At RM 0.65 per kilometer,
Your reimbursement is RM 198.25




Cara download Installer windows 10 dalam format ISO

1. Jika anda bercadang untuk download windows 10 melalui website rasmi windows - pilihan untuk download dalam format ISO tidak di berikan.  ...