Professional Documents
Culture Documents
Activity 01 For Module 01 (Deadline On Friday)
Activity 01 For Module 01 (Deadline On Friday)
0 30-March-2021
Activity 01
100 + 50
In the example below, the numbers 100 and 50 Try to run this code:
are operands, and the + sign is an operator: //Java Operators Example 1
Example: public class MyClassJavaOperators1 {
int x = 100 + 50; public static void main(String[] args) {
int x = 100 + 50;
System.out.println(x);
}
}
Although the + operator is often used to add Try to run this code:
together two values, like in the example above, //Java Operators Example 2
it can also be used to add together a variable public class MyClassJavaOperators2 {
and a value, or a variable and another variable: public static void main(String[] args) {
int sum1 = 100 + 50;
Example: int sum2 = sum1 + 250;
// 150 (100 + 50) int sum3 = sum2 + sum2;
int sum1 = 100 + 50; System.out.println(sum1);
// 400 (150 + 250) System.out.println(sum2);
int sum2 = sum1 + 250; System.out.println(sum3);
// 800 (400 + 400) }
int sum3 = sum2 + sum2; }
This will produce an output:
150
400
800
Arithmetic Operators
Arithmetic operators are used to perform common mathematical operations.
Operator Name Description Example
+ Addition Adds together two values x + y`
Example:
int x = 10;
Try to run this code: This will produce an output:
//Assignment Operators 1 10
public class
MyClassAssignemntOperators1 {
public static void main(String[] args) {
int x = 10;
System.out.println(x);
}
}
The addition assignment operator (+=) adds a Try to run this code:
value to a variable: // Assignment Operators 2
Example: public class
int x = 10; MyClassAssignemntOperators2{
x += 5; public static void main(String[] args) {
int x = 10;
x += 5;
System.out.println(x);
}
}
+= x += 3 x=x+3
-= x -= 3 x=x-3
*= x *= 3 x=x*3
public class
MyClassMultiplyAndAssignmentOperator
{
public static void main(String[] args) {
int x = 5;
x *= 3; // same as x = x * 3;
System.out.println(x);
}
}
/= x /= 3 x=x/3
|= x |= 3 x=x|3
^= x ^= 3 x=x^3
For easy tracking of your file/s strictly follow the correct filename format given below.
Filename: Deadline:
LastnameFirstNameMI_Assignement1 October 08, 2021 till 5:00 PM
e.g. DelacruzJuanL_Assignment1
IMPORTANT! Late submission of paper/s will not be accepted, regardless of the reason(s).
Additional Information:
IMPORTANT! Read carefully with understanding and strictly follow the instructions given below.
1. All home-based activities/assessments except quizzes (i.e. assignments, activities, exercises and etc.)
shall be submitted to the FB Messenger (Group Chat) and MS Teams account.
FB Messenger (GC) -> First Priority
1.1 Using Facebook Messenger on a Desktop, Laptop, Phone or Tablet.
1.1.1 Open Facebook.
1.1.2 Tap ☰.
1.1.3 Tap Groups.
1.1.4 Tap Files.
1.1.5 Tap +.
MS Teams -> Second Priority
1.2 Go to General Posts:
1.3.2.1.1 Open the Word document of which you want to set the password.
1.3.2.2 Click the File Tab and then click the Info option and then the Protect Document button
that shows a list of options to be selected.
1.3.2.3 Now click the Encrypt with Password option simply by clicking on it. That will display
an Encrypt Document dialog box asking for a password to encrypt the document. This
dialog box will appear twice to reenter the same password. And every time click the OK
button after entering the password
Note: If a document “does not have a password”, the overall score will be deducted
by five (5) points.
2. If ever all documents taken as photos shall be renamed bearing your name and the activity (e.g.
LastnameFirstnameMI_Activity1) for purposes of monitoring of submission and on-time passing.
See number 1.2.1 also as guide. Compressed the file/s (e.g. images or photos taken in your screenshots)
using .zip or .rar format before sending it to you FB Messenger (Group Chat) and MS Teams account.
2.1 How to compress your file and put password on it?
2.1.1 First, make shore that WinRAR or WinZip software installed in your device. You can download
the software’s in the links below:
2.1.1.1 https://www.rarlab.com/ or https://www.win-rar.com/ or https://www.winzip.com
2.1.1.2 Click here for detailed instructions on installing WinRAR.
2.1.1.3 Right Click on the files you want to compress and click on "Add to archive".
2.1.1.3.1 Open the WinRAR window and then browse for the files you want to Select
all the files and then click the "Add" button.
2.1.1.3.2 Select all of the files you want to archive in Windows. Right-click on your
selection and choose "Add to archive".
2.1.1.4 Give your archive a name. By default, it will be named after the folder the files were
originally in.
2.1.1.5 Click the Set password... button. This is located in the General tab of the "Archive
name and parameters" window that appears when creating a new archive.
2.1.1.6 Enter in your password. Enter it a second time to confirm it. You can check the
"Show password" box to see the characters as you type them.
2.1.1.7 Check the "Encrypt file names" box. This will ensure that no one can see the names
of the files contained in the RAR file until after they have successfully entered the
password.
2.1.1.8 Click OK to save your password. Click OK in the "Archive name and parameters"
window to create your new RAR file.
2.1.1.9 Test it out. After the RAR file is created, you can double-click it to test it out. When
you try to extract it, you will be prompted for the password you created.
3. If ever FB Messenger will reject your .rar or .zip file format alternative is to upload it to the free host file
serves such as: google drive or mediafire then share/post the link in the fb messenger group chat.
4. (Optional) Add “watermark” (sample format: DelaCruzJuanT_8-12-2021) inside your document.
4.1 How to insert a watermark in Microsoft Word (2007-current)?
4.1.1 On the Design tab, select Watermark.
4.1.2 In the Insert Watermark dialog, select Text and either type your own watermark text or select
one, like DRAFT, from the list. Then, customize the watermark by setting the font, layout, size,
colors, and orientation.
4.1.3 Select OK.
5. Congratulations!