Advance programming


{02.04.21}





Hello!!! It's been a while that I was in a hiatus. Lots of stuff to housekeep lately. But rest assured to those who are regularly visiting this blo, expect that more sharing of computing will be posted.

This TAB was devoted to my previous students who are studying in programming(JAVA). Expect that in the coming days and months there will be more updates and lesson in this blog on programming.

I will not discuss singularly on java but in different PL (programming Language as well). I will re erect also the Python, php, javascript and its web frameworks soon.

To those who are posting their comments, please dont hesitate to ask and I will be glad to answer it.

Again..lets' do it.


ATTENTION BSIT 3RD YEAR!
(NOTE : For those students with INC grade)

2nd Phase:

Problem:

a) Write a program in java that will use the FILE class. Read this file -> dataStudent.txt.

Content of dataStudent.txt

Lastname    Firstname   Course  Prelim    Midterm     Final

KEOGH     JOE             IT         80               80             80
DOEMAR  REY            IT         80               90            75


(Note* create this file using any editor and save this as rich text format i.e .txt)

You can use these constructors:

FileReader or BufferedReader

Output:

1. Display the content of dataStudent.txt

b)Write  an  Applet program that will display this value - " PHINMA UNIVERSITY OF ILOILO" using the <param> tags. Infuse this in your HTML code and save it to  disp.html

*Inside the Java program, you need to call this value via String class.

*Invoke the GOEE class like Abstract Windows Toolkit and the Swing, don't forget to call the JApplet class. Save this to Data.Java

Mirror example:

//<html>
//<title>...</title>
//<body>
//
//<applet =  "Data.class" width = 300 height = 300>
//<param = "msg" value = "BOB HOPE">
//</applet>

//java program
//invoke the GOEE
//call the applet class

//void init()


//void Paint(Graphics g)



Submit this on May 5, AT 9AM-12:00PM , STUDENTS COMMON/LOUNGE

*******Nothings Follow*********






1st Phase:

Problem:

Write a program that will produce a random numbers from 1 to 10:

1 = A
2 = B
3 = C
4 = D
5 = E
6 = F
7 = G
8 = H
9 = I
10 = G

This is  congruent to Picker Game application.

Requirements:

1. Write the program in Java and produce the .java and .class file
  (you can use Eclipse/BlueJ or NetBeans)

a. Hoard this in your laptop for demonstration
b. Prepare your algorithm, write it in your bandpaper.
c. Print your source code.

2. Convert this program to JavaScript and Php

a. Hoard this in your laptop for demonstration
b. Print your source code.

3. Convert this program to "GOEE"  using the javax.swing.JOptionPane.

a. Hoard this in your laptop for demonstration
b. Print your source code.

4. Convert this program to JFRAME using JFrame class/methods.

a. Hoard this in your laptop for demonstration
b. Print your source code.

This is the 1st Phase of the problem, submit this on April 28 at 9:00am - CITE Department.

2nd Phase will commence on April 29,2018.

- - - - - Nothings follow - - - -



ATTENTION BSIT 3RD YEAR
12.21-25,17

This is your turf!

Creating a program is fun, its about composition of codes(the instructions), but it is imperative to learn first the essence of programming, you create and write a program to automate the works right? its about knowing how your program works for the people. Focus and learn the way of programming. There are sheer computer languages in the market, but the principles are the same, lets get back to the basic.

You want to become  a programmer? if yes then read the following particulars.

If you can answer the following questions then you got the basic and perception about the basic COMPUTING.

a) What is a program?
b) What is a data Structure?
c)  What is a data literals?
d)  What is a procedural programming? how it differs to OOP?

OOP is the most abused term, only few students could apply the real OOP, most of the time they consider the skin of procedurial programming as OOP which is very wrong and unsound.

What is the next steps? read and UNDERSTAND the following.

- Syntax and lexemes
- Data Types
- IO
- Controls
- Recursion
- Interface
- Exceptions

************************
Lets us apply it here.

We will apply the bit principle of OOP.

OOP is more of classes and objects. Don't be confused, class is the blue print of the entire program, same with the procedurial style. What ever we do here, we will translate it to another language to have the clearer view of the topic.

What  to research?

a) what is a static class and a none static class?

  example of static class in java(Later we will tackle c#)

 ex.  STRING, CHARACTER,SCANNER,INTEGER....(expand your knowledge and research more about static class)

  Class can INVOKE methods. How? It is like a library with main program and functions to support the code.

ex. String class has the following static methods.

substring, replace,lenght,atChar (...expand your knowledge ...)

Let's code:)

//call the package or library  for the class to invoke methods and kiss some object:)

//java

public class Data{
public static void...

  String line = "hello world";
//invoke the string method to check the length of the line

System.out.println("total length" + line.length);
System.out.println("line.substring(0,3));
System.out.println("convert to upper case" +  line.toUpperCase());
System.out.println(" replace H with r" + line.replace('r','H'));

..
..

******

Practice! practice!



************************
Task starting today.12.3.17

1. Review your programming stuff like, basic java and Php
2. Identify the difference between LATENT and DUCK Programming(write this in your 1 whole sheet of pad paper/band paper)
3. Submit your task/assignments
a) Mini Payroll program
b)Calculator program with methods
c)Translate your calculator program to C sharp and Php

4.Review your OOP and OOD(object oriented Design)

******************

Brief about computer programming.

It is a paradigm of IPO (input process output). Commands are translated into a machine code to interpret or compile the program.

How to attack the program?

1. Understand how the computer works
2. Understand the differenCE  between compiled and interpreted program
3. Know your operating system
4. Study the syntax and lexemes

YOur tasks are...(I will collect your tasks/assignments this week for evaluation)

1. Write all the String methods(pre defined methods of  java) with definitions and examples
2. Write all the String methods(pre defined methods of Php) with definitions and examples
3. Write all the String methods(pre defined methods of C sharp) with definitions and examples
4. What is static class? what is a class?


Where to go? Not in You TUBE! in the Library? If you can't understand the jargons,commands or related topics, bring it on my desk and I will explain it.

READ ING will LEAD you to UNDERSTAND tomorrows FAbric.

(write this in your 1 whole sheet of padpaper/band paper.)

*******************

(FOR OOP STUDENTS)

Aug. 23,2017.

HELLO BSIT 3rd year, please read this  brief discussion on OOP. We will cover our missed lectures with in this month.

OOP is object oriented programming, the basic of OOP will start first with functional or imperative programming. Functional is creating function with arguments or a void function. While procedural is programming  derived from structured programming.

You have already reviewed the basic reiteration and decision support using the loop commands and if..else..command. Let us expand it to give you more comfortable of the syntax and knowing the significance of the code.

Example:

to repeat the output you need to use for loop;do loop;while loop;

      Using while...loop

      (case print "hello world" 5 times)

     int count;while(count<5){ SOP("hello world"); count++ }
 
     if you analyze the code, it is simple, first we declare the count as a variable to
    control the loop, second we determine the value of count if it is true or not(obviously it
   won't execute if it is less than 5), third we injected the action - SOP and we increment
   the counter for count.

    Start rolling!!!

   ASSIGNMENT NO.(Write this in your one whole sheet of pad paper)

   7. Write a program, class named Roll. Print the value of count from 1 to 100. Use the
       for loop.
   8. Reverse the program in number 7, use the While..loop
   9  Expand you Roll program. If the loop reaches 5 print this "hit number 5")
       (a) Use the while loop
 
  10. Write all the reserve words of Java programming, with their definitions.



Aug. 17,2017

Hello BSIT 3rd year, this is your OOP turf. Copy the app from your classmates, to maximize the usage of your mobile phone. App can be downloaded in the home page, just look for the "citeway" or "citewayviewer" and connect your cable to your mobile phone and copy this in your phone folder-> ../android/data that's it.

*****

We have discussed the paradigm of programming, gamut from functional, imperative and OOP, the pre requisites of this OOP subject is your perception in the following professional subjects like,
Data Structure and Basic Programming (in any PL).

I demonstrated to you the various programming styles in OOP. You can use different PL that has the OOP behavior, example javascripts, Java, C#, C++,  Php and related PL. For now, we need to review and go back to structured programming,imperative and functional to understand the very basic of OOP.

Last time, we commenced the discussion using the I/O , input and output , data literals, data specifier and the reiteration by means of loop. To be specific using the for loop:) kids stuff.

Since I have already explained the basic elements of programming, because it is very important to start with the basic, please accomplish the following tasks.

Submit this on Aug. Aug.23.2017
Instruction: Write this in your band paper.

1. Write a program in Java that will loop your name from 1 to 10,
    if the count hit 5 display "hit number 5"

2. Reverse the loop in problem 1, use the Do Loop

3. Write the Flow Chart for Number 1 and Number 2 problem

4. Research the function of BREAK and CONTINUE

5. Write a program in java that will enter the following.

5.1 Enter Lastname
5.2 Enter Firstname
5.3 Enter Course

(Condition: if course is equal to "IT" display "CITE"; if course is equal to "BSN" display "HEALTH AND ALLIED COURSES; if course is equal to "CRIM" display "CRIM DEPARTMENT"; if course is equal to "MAR-E" display "MARINE DEPARTMENT"; otherwise display" INVALID COURSE".

Use the Scanner as a package for I/O.

6. Write a flowchart in Problem 6.

**************************
.



6 comments:

  1. Hi, Great.. Tutorial is just awesome..It is really helpful for a newbie like me.. I am a regular follower of your blog. Really very informative post you shared here. Kindly keep blogging.
    AWS training in chennai

    AWS Training in Bangalore

    ReplyDelete
  2. hi there, thanks. I'm bit busy for a while, rest assured, more blogs from me

    ReplyDelete
  3. Thank you, it was a hiatus for a while..more blogs to come

    ReplyDelete