Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
13 views

Computer Programming 1

Uploaded by

Kkk Lll
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

Computer Programming 1

Uploaded by

Kkk Lll
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 9

COMPUTER

PROGRAMMIN
G1
INSTRUCTOR:
JUNIKS CRIS CALAHI

COMPILATION BY:
MARK JOSEPH D. PATROCINIO
Laboratory activity 1

System.out.println("baguio central university");

System.out.println("vision & mission"); }

Laboratory Activity2

System.out.println("(int) (7.9) = " + (int) (7.9) );

System.out.println("(double) (3.3) = "+ (double) (3.3));

System.out.println("(double) (25)= "+ (double) (25));

System.out.println("(double) (5+3)= "+ (double) (5+3));

System.out.println("(double) (15) / 2= "+ (double) (15) / 2);

System.out.println("(double) (15) / 2)= "+ ((double) (15) / 2));

System.out.println("(int) (7.0+ (double) (15)/2) = " + (int) (7.0+ (double) (15)/2) );

System.out.println("(int) (7.8 + (double) (15)/2) = " + (int) (7.8 + (double) (15)/2)); } }

Activity3

System.out.println(" 3/2) + (5.0)= "+ (double) (3/2)+ 5.0);

System.out.println(" (15.6) / (2+1) = "+ (15.6) /(2+1));

System.out.println("4+5 / 2.0 = " + (4 + 5 / 2.0));

System.out.println("4*3 + 7/5 - 25.5 = " + (4*3 + 7/5 - 25.5)); } }

Programming development cycle

Research on the development cycle of programming

1. )Defining

-something is to give it a meaning. We define a variable by assigning it a value.


- to know what kind of computer languages to use in a program

2.Planning

-Planning and programming involves the identification of the project objectives and the development of

a statement of work that identifies the project or program priorities and activities to be performed by

the project partners.

-Description of the project or program.

-Responsible organizations.

-Time frame.

-Cost.

-Funding sources.

-Obtainment of appropriate approvals.

3.Coding

-creates a set of instructions for computers to follow. These instructions determine what actions a

computer can and cannot take. Coding allows programmers to build programs, such as websites and

apps. Computer programmers can also tell computers how to process data in better, faster ways.

-the act or process of expressing a message in words, images, sounds, or any other set of symbols or

signs

4.Testing

-the process of evaluating and verifying that a software product or application does what it's
supposed

to do

-it identify bugs, defects, and vulnerabilities before deploying the software.

5.Implementation

-the process of taking on a new software application and incorporating it into existing business

workflows.
-installing a new hardware or software system or application.

6.Maintenance

-the process of modifying a software or program after delivery to achieve any of these outcome, Correct

errors. Improve performance. Add functionalities. Remove obsolete portions.

-ensure that all necessary equipment for maintenance is production is always to carry out its efficient

work.

SEATWORK

1 .)html - Hypertext Markup Language

2 . )Example of tag declaration beginning and the ends- Start tag Element content End tag <h1> My First
Heading </h1> <p> My first paragraph. </p> <br> none none Opening Tag Closing Tag <html> </html>
<head> </head> <title> </title> <body> </body> <!DOCTYPE html> <html lang="en"> <head> <title>Title
of the document</title> </head> <body> <h1>This is a heading</h1> <p>This is a paragraph.</p>
</body> </html> 3 .)HEAD - The <header> element represents a container for introductory content or a
set of navigational links.

4 . ) TITLEE - The <title> tag defines the title of the document. The title must be text-only, and it is shown
in the browser's title bar or in the page's tab.

5 .)BODY - The <body> tag defines the document's body. The <body> element contains all the contents
of an HTML document, such as headings, paragraphs, images, hyperlinks, tables, lists, etc.

6 .) notepad - pre-installed on your Windows computer. The language used to create web pages is called
"HTML," which stands for Hypertext Markup Language.

7 .) notepad ++ - a free text and source code editor for use with Microsoft Windows. It supports tabbed
editing, which allows working with multiple open files in a single window. It also a source code editor

8 .) PS pad editor - a freeware text editor and source editor intended for use by programmers.

9 .)torch -enables you to specify the device type responsible to load a tensor into memory contains data
structures for multi-dimensional tensors and defines mathematical operations over these tensors.

10 .)Opera - is a web browser developed by Opera Software AS. Opera started out as a research project
at Telenor, the largest Norwegian telecommunications company, in 1994. Opera is available for Windows,
macOS, and Linux. Opera Mini is for Android. Opera uses the Blink rendering engine, so the web
standards support should be similar to Google Chrome.
11 .)Firefox - a free and open source web browser developed by the Mozilla Foundation and its
subsidiary, the Mozilla Corporation. It uses the Gecko rendering engine to display web pages, which
implements current and anticipated web standards.

12 .)chrome - free web browser used for accessing the internet and running web-based applications. The
Google Chrome browser is based on the Open Source Chromium web browser project. Google released
Chrome in 2008 and issues several updates a year. 13 .)Microsoft Edge - Edge HTML is the proprietary
browser engine originally developed for Edge. a fork of the MSHTML (Trident) engine of Internet
Explorer. It is designed as a software component that enables developers easily to add web browsing
functionality to other apps.

SEATWORK LAB 1

<!DOCTYPE html>

<html>

<head>

<title> Seatwork number 1

</title>

</head>

<body>

<Script> document.write("<h1>My First Java Script Program </h1");

</Script>

</body> </html>

QUIZ

1.<html> </html>

2. <note> </note>

3. <title> </title>

4.<title>webpage title</title>

5. <title>
6.<body>

7.notepat

8.notepad++

9.ps pad editor

10.fire fox

3 list text editors to write javaScript program

1.notepad++

2.eclipse

3.net beans

3 web browser to interpret and execute the program

1.mozilla fire fox

2.goggle chrome

3.microsoft edge

LAB SEATWORK2

class markjosephpatrocinio{

public static void main(String[] args) {

System.out.println("5.0 + 3.5= "+ (5.0 + 3.5));

System.out.println("3.0+ 9.4="+(3.0+9.4));

System.out.println("16.4 - 5.2 = " + (16.4 - 5.2));

System.out.println("4.2 * 2.5 ="+(4.2 * 2.5));

System.out.println("5.0/2.0="+(5.0/2.0));

System.out.println("34.5/6.0="+(34.5/6.0));

System.out.println("34.5%6.0="+(34.5%6.0));

System.out.println("34.5/6.5="+(34.5/6.5));

System.out.println("34.5%6.5="+(34.5%6.5));
}

ACTIVITY2

1.) World: The main Box2D object that contains all the world objects and simulates the game physics.

2.) Body: A rigid body that may consist of one or more shapes attached to the body via fixtures.

3.) Shape: A two-dimensional shape such as a circle or a polygon, which are the fundamental shapes
used within Box2D.

4.) Fixture: Used to attach a shape to a body for collision detection. Fixtures hold additional, non-
geometric data such as friction, collision and filters.

5.)Joint: Used to constrain two bodies together in different ways. For example, a revolute joint constrains
two bodies to share a common point while they are free to rotate about the point

LAB ACTIVITY PRE-FINALS


Checking of Laboratory(Program Improvement)
FINALS ACTIVITY 1

1.)How does the "pass-by-value" mechanism differ from "pass-by-reference"? Illustrate with examples
from C++ and Python. c++ #include <iostream> using namespace std; void modifyValue(int a) { a = 10; //
This modification is local to the function } int main() { int num = 5; modifyValue(num); cout << "Value of
num after function: " << num << endl; // Output: 5 return 0; } PASS BY PASS REFERENCE #include
<iostream> using namespace std; void modifyValue(int &a) { a = 10; // This modifies the original
variable } int main() { int num = 5; modifyValue(num); cout << "Value of num after function: " << num <<
endl; // Output: 10 return 0; } PHYTHON def modify_value(a): a = 10 # This reassigns a local variable,
does not affect the original num = 5 modify_value(num) print(num) # Output: 5

2.)What is the significance of "null safety" in programming languages? Name a language that addresses
null safety issues effectively. Null safety ensures that variables cannot be assigned null values unless
explicitly allowed, reducing the likelihood of null pointer exceptions and increasing program reliability.
fun printLength(str: String?) { println(str?.length ?: "String is null") } val myString: String? = null
printLength(myString) // Output: String is null

3.)Explain the importance of modularity in programming languages. How do concepts like packages (in
Java) or modules (in Python) help? Modularity refers to the practice of breaking down a program into
smaller, self-contained units (modules or packages), each of which can be developed, tested, and
maintained independently. It improves code reuse, maintainability, and readability. It also allows for
parallel development and easier debugging by isolating different parts of the system. package
com.example.utilities; public class MathUtils { public static int add(int a, int b) { return a + b; } } //
Main.java in a different package import com.example.utilities.MathUtils; public class Main { public static
void main(String[] args) { System.out.println(MathUtils.add(2, 3)); // Output: 5 } }

Checking of Program improvement

You might also like