🔒 Closed Some of my Program in Java baka makatulong sa mga kapwa ko Programmer

Status
Not open for further replies.

Kenji246

Eternal Poster
Baka makatulong sa mga kapwa ko Programmer at sa mga nagbabalak pag-aralan ang java. This is some of my coding in java that we can provide to learn at mas maiintindihan pa lalo kung paano nag fufunction ang program using data types, strings, functions and etc.

I said na sa pag-poprogram kailangan talaga may critical thinking tayo lalo na pagdating sa math dahil napakahalaga neto lalo't walang mangyayareng program kung walang mathematically evaluation at kailangan alam natin ang basic at technique how to run the program.

Some of my work free to copy if ever na gusto mong malaman how and what is the output of the program is it

Kung makikita nyo yung sa public class yung katabi nun it is depends on the name of your file and you will have to change it and it can be run the program.

Finding the Current Attack Speed by Entering the Base Attack, Bonus Attack and Level

[CODE lang="java" title="Finding the Current Attack Speed by Entering the Base Attack, Bonus Attack and Level"]import java.util.Scanner;

public class GameInfo {

public static void main(String[] args)

{

System.out.println("Hello World");

int Level;

double baseAttack,bonusAttack;

Scanner num = new Scanner(System.in);

System.out.println("Enter the Base Attack : ");

baseAttack = num.nextDouble();

System.out.println("Enter the Bonus Attack % : ");

bonusAttack = num.nextDouble();

double newBonusAttack = bonusAttack /= 100;

System.out.println("Enter the Level : ");

Level = num.nextInt();

System.out.println(newBonusAttack);

double CurrentAttackSpeed = baseAttack*(1+(newBonusAttack*(Level-1)));

System.out.println("The Character's current attack speed is : " + CurrentAttackSpeed);

}

}[/CODE]


Finding the Netpay

[CODE lang="java" title="Finding the Netpay"]package myproject;

import java.util.Scanner;

public class NetPay {



public static void main(String[] args)

{

Scanner num = new Scanner(System.in);

String employeeName;

double grossPay;

int percent;

percent = 15;

double contribution;

contribution = 3.63;

double medicare;

medicare = 1.25;

int pagibig;

pagibig = 100;



System.out.println("Enter the Employee Name");

employeeName = num.nextLine();

System.out.println("Enter the Gross Pay");

grossPay = num.nextDouble();

System.out.println("\n");

System.out.println("Employee Name : " + employeeName);

System.out.println("Gross Pay : " + grossPay);

System.out.println("\n");

System.out.println("Deduction" + "\t\t|" + "\tAmount");

///HoldingTax

double HoldingTax = percent * grossPay;

HoldingTax /= 100;

System.out.println("Holding Tax : " + "\t" + HoldingTax);

///SSSContribution

double SSSContribution = contribution * grossPay;

SSSContribution /= 100;

System.out.println("SSS Contribution : " + "\t" + SSSContribution);

///Medicare

double Medicare = medicare * grossPay;

Medicare /= 100;

System.out.println("Medicare : " + "\t" + Medicare);

System.out.println("Pag-Ibig : " + "\t" + pagibig);

System.out.println("__________________________________________");

///NetPay

double netPay = grossPay - (HoldingTax + SSSContribution + Medicare + pagibig);

System.out.println("Net Pay : " + "\t" + netPay);

}

}[/CODE]


Finding the Kinetic Energy by Entering Mass in Kg and velocity

[CODE lang="java" title="Finding the Kinetic Energy by Entering Mass in Kg and velocity"]
public class Main{

public static void main(String[] args) {

Scanner sc = new Scanner(System.in);

System.out.println("Enter the mass in Kg");

double kg=sc.nextDouble();

System.out.println("Enter the velocity in m/s");

double v=sc.nextDouble();

double b=(0.5*kg*v*v);

System.out.println("The kinetic energy="+b+"J");

}

}[/CODE]


String to Reversed string

[CODE lang="java" title="String to Reversed String"]import java.util.Scanner;

public class Main {



public static void main(String[] args) {

String str;

System.out.println("Enter your username: ");

Scanner scanner = new Scanner(System.in);

str = scanner.nextLine();

scanner.close();

String reversed = reverseString(str);

System.out.println("The reversed string is: " + reversed);

}



public static String reverseString(String str)

{

if (str.isEmpty())

return str;

//Calling Function Recursively

return reverseString(str.substring(1)) + str.charAt(0);

}

}[/CODE]


From now hangggang dito muna comment lang kayo if gusto nyo pa ng panibago from another language or java pa den to help some other and it will be good kung iintindihin nyo yung program at pagaaralan how does function it as well.

Sa mga newbie dyan don't worry mag popost ulit ako ng panibagong thread may mga gawa naman ako dito that we can help to pursue to learn programming.

Sa mga may assignment dyan click nyo to: https://phcorner.org/threads/kahit-load-lang-po-50-or-100.1024061/

Feeedback mga lodi :)
 
Salamat po boss, Actually marame pa po yan kaso sa susunod na thread na lang para malaman how does it function as well gabay na rin sa mga kapwa estudyante ko dyan. 😍
 
Status
Not open for further replies.

About this Thread

  • 11
    Replies
  • 1K
    Views
  • 8
    Participants
Last reply from:
Acyl Mae

Trending Topics

Online now

Members online
486
Guests online
1,740
Total visitors
2,226

Forum statistics

Threads
2,315,296
Posts
29,181,963
Members
1,183,519
Latest member
kabaong
Back
Top