2/05/2018

BCS1013 Prob Solving & Comp Programming . Lab 6 /2/2019

1. Consider the following flowchart:-
I.    Identify selection structure and looping structure.
II.   State the value that will stops the loop.
III.  Write a C++ program to demonstrate the following flowchart.
IV.   Run the program several times with various input value. Analyse the output.
V.    Explain what is the program intended to do.



2. Print the following output using a C++ program


5   4   3   2   1
5   4   3   2   1
5   4   3   2   1
5   4   3   2   1

3. Print the following output using a C++ program

1
1   2
1   2   3
1   2   3   4
1   2   3   4   5


4.  Print the following output using a C++ program






5. Print the following output using a C++ program
6.Print the following output using a C++ program
7. Print the following output using a C++ program


2/03/2018

BCS 2233 Object Oriented Programming (BIMB,BCSC,BCNS)



Berikut adalah bahan-bahan pengajaran untuk subjek BCS 2233 Object Oriented Programming.

1) 'Lesson Plan' / Rancangan Pengajaran.

BIBM, BCSC, BCNS

2) Buku Rujukan Y. Daniel Liang, Introduction to Java™ Programming, Brief Version, 11th Edition. 2017. Pearson Education. 


3) 'Power point slide' bagi buku di atas boleh di dapati dari sini. Jumlah "Chapter" yang tersedia adalah sebanyak 42 "Slide", namun hanya Chapter di bawah sahaja yang terlibat. Pelajar di sarankan untuk membawa bahan ini (samada buku atau slide yang di cetak) ke kelas.


Chapter 1 Introduction to Computers, Programs, and Java 
Chapter 2 Elementary Programming 
Chapter 3 Selections 
Chapter 5 Loops 
Chapter 6 Methods 
Chapter 9 Objects and Classes 
Chapter 10 Thinking in Objects 
Chapter 11 Inheritance and Polymorphism
Chapter 14 JavaFX Basics

Beberapa bahan seperti koding Java yang terdapat di dalam buku ini boleh di dapati daripada sumber berikut.


4. Perisian
Dua jenis Perisian yang perlu ada untuk membangunkan program Java iaitu Enjin Java (JDK)  dan Editor untuk menulis program java seperti  Jcreator atau Eclipse atau Netbean.

4.1 JDK boleh di dapati dari link berikut:- 
http://java.sun.com/javase/downloads/index.jsp


4.2 Editor Untuk Java:-

a) JCreator. Pelajar akan menggunakan IDE ini bagi membangunkan program java.
Versi percuma JCreator boleh di dapati dari link berikut:- http://www.jcreator.org/download.htm

 b) Eclipse http://www.eclipse.org/downloads/packages/eclipse-ide-java-developers/mars1

 c)NetBean
https://netbeans.org/downloads/

? keliru versi yang mana satu perlu di download!!!

1/31/2018

Bahasa Pengaturcaraan 2018

Bahasa pengaturcaraan manakah yang menjadi keperluan pada tahun 2018.
fossbytes.com mengeluarkan carta berikut:-


Java ialah bahasa yang di gunakan secara meluas dalam  "distributed environment". Pembangunan sistem untuk Android dan "Internet of Things".

Python menyokong ciri "machine learning". Ia mempunyai "syntax" yang mudah dan jelas.

JavaScript adalah program untuk "browser". Antara kegunaanya ialah mengawal input data pada sistem "online" (yang di embed pada browser). 

C++ adalah bahasa kepad penciptaan bahasa lain (seperti Java) . Pembangunan games masih memerlukan bahasa seperti ini kerana ia lebih dekat kepada native mesin . 

PHP banyak di gunakan dalam membangunkan sistem online.

Perl juga banyak di gunakan untuk pembangunan sistemonline. Bahasanya mirip C.

Rujukan
https://www.youtube.com/watch?v=5bm5tT0bN7c
https://www.youtube.com/watch?v=LR8fQiskYII
http://whatis.techtarget.com


1/28/2018

PHP 7, mysql, Dreamweaver Server Behaviour

1. PHP 7 telah dilancarkan pada 30 Nov 2017. Beberapa perubahan telah di buat iaitu menambahkan ciri dan fungsinya, termasuk juga membuang beberapa fungsi lama dan di ganti dengan yang baharu.

2. mysql ialah fungsi tambahan kepada PHP. Ianya di perkenalkan pada PHP 2 hingga 6. Di mansuhkan penggunaanya pada PHP 7.

3. Ekoran pemansuhan  mysql. Fungsi seperti mysql_connect(), mysql_select_db() tidak lagi di kenali oleh PHP 7. Extension mysql telah di gantikan dengan mysqli. 

4. Solusi kepada pembangun sistem yang ingin kekal dengan mysql, pada masa yang sama ingin menggunakan PHP 7- boleh mencuba kaedah dari sini (https://ckon.wordpress.com/2015/08/06/put-mysql-functions-back-into-php-7/)

5. Bagi pengguna Dreamweaver. Setakat ini saya masih belum jumpa "add on" percuma bagi mysqli. "add on" berbayar boleh di dapati dari Webassist (http://www.webassist.com/product/mysqli) dan DMX Zone


Rujukan
http://phppot.com/php/mysql-vs-mysqli-in-php/
http://www.webassist.com/product/mysqli

1/27/2018

PHP Version 7

 P 

1. PHP ialah bahasa pengaturcaraan untuk server. PHP banyak digunakan dalam membina sistem online. Versi terkini (28 Jan 18) ialah PHP 7.22 , di lancarkan pada 30 Nov 2017.

2. Antara tambah baik ialah Respond Server meningkat, keperluan mengistiharkan jenis pembolehubah, fungsi Error Handling di sediakan, Operasi dan fungsi baharu (cth Spaceship Operator dan fungsi CSPRNG) di perkenalkan,

3. Terdapat beberapa fungsi yang di masukkan dalam katogeri "tidak di dalakkan guna"  seperti
PHP 4 style constructors.


4. Terdapat beberapa fungsi  telah di buang pada PHP ini antaranya mysql (di ganti dengan mysqli).

 Rujukan 
http://php.net/archive/2017.php
http://php.net/manual/en/intro-whatis.php
https://www.startutorial.com/articles/view/5-new-features-in-php-7-that-you-should-have-a-look-at
https://www.tutorialspoint.com/php7/php7_removed_extensions_sapis.htm

12/18/2017

BCS 1013 PSCP (Dis): An Overview of Computers and Programming Languages

Exercise : An Overview of Computers and Programming Languages

1. Name two input devices.
2. Name two output devices.
3. What are the differences between machine languages and high-level languages?
4. Why do you need a compiler?
5. Why would you prefer to write a program in a high-level language rather than a
machine language?
6. What are the advantages of problem analysis and algorithm design over directly writing a
program in a high-level language?
7. Design an algorithm to find the  average of four test scores.

12/04/2017

BCS 1013 PSCP. Lab File Input and File Output

1. Consider the following C++ program. What is the content of "test.txt".

#include
#include

using namespace std;
int main(int argc, char *argv[])
{
   ofstream out("test.txt");
   out << 10 << " " << 123.23 << "\n";
   out << "This is a short text file.";
   out.close();
   system("PAUSE");
   return EXIT_SUCCESS;

}


2. Write a program that prompts user to enter:-

    Name
    Age
    State
    Country

and write into a file named biodata.txt as follows.


Name   : Ahmad Ashraaf
Age    : 19
State  : terengganu
Country: Malaysia

3. The following program is supposed to read two numbers from a file named input.dat and write the sum of the numbers to a file named output.dat. However, it fails to do so. Rewrite the program so that it accomplishes whatit is intended to do. (Also, include statements to close the files.)

#include
#include
using namespace std;
int main()
{
int num1, num2;
ifstream infile;
outfile.open("output.dat");
infile >> num1 >> num2;
outfile << "Sum = " << num1 + num2 << endl;
return 0;
}


4. Assume that each of the following statements applies to the same program.

i)   Write a statement that opens file oldmast.dat for input; use an ifstream object called inOldMaster.

ii)  Write a statement that opens file trans.dat for input; use an ifstream object called inTransaction.

iii) Write a statement that opens file newmast.dat for output , use ofstream object outNewMaster.

iv) Write a statement that reads a record from the file oldmast.dat. The record consists of integer accountNumber, string name and floating-point currentBalance; use ifstream object inOldMaster.

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.  ...