This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package uk.ac.qub.practicals; | |
// importing scanner | |
import java.util.Scanner; | |
public class LeapYearApp { | |
public final static int CURRENT_YEAR = 2013; | |
public final static int MINIMUM_YEAR = 1900; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package qub.ac.uk.practical.week5; | |
// import scanner | |
import java.util.Scanner; | |
public class PracticalQuestionTwo { | |
/** | |
* A method for calling a case converter method | |
* @param args |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package qub.ac.uk.practical.week5; | |
// importing scanner | |
import java.util.Scanner; | |
public class PracticalQuestionThree { | |
/** | |
* @param args | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package qub.ac.uk.practical.week5; | |
public class PracticalFiveQuestionOne { | |
/** | |
* Constant rate of pay. | |
*/ | |
public static final double PAY_RATE = 10.25; | |
/** | |
* A method which calculates wages from an array |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package qub.ac.uk.practical.week5; | |
public class PracticalFiveQuestionTwo { | |
public static void main(String[] args) { | |
// Declaring vars | |
double average; | |
average = 0.0; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package qub.ac.uk.practical.week5; | |
public class PracticalFiveQuestionThree { | |
/** | |
* A method which calculates various statistics of students from an array | |
* @param args | |
*/ | |
public static void main(String[] args) { | |
// Declaring vars to hold average height, tallest and smallest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package uk.ac.qub.assessedpracticaltwo; | |
// Importing required SQL functions | |
import java.sql.Connection; | |
import java.sql.DriverManager; | |
import java.sql.PreparedStatement; | |
import java.sql.ResultSet; | |
import java.sql.SQLException; | |
import java.sql.Statement; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package practicalonep2.uk.ac.qub; | |
import java.util.Scanner; | |
public class Palindrome { | |
public static void main(String args[]){ | |
String original, reverse=""; | |
Scanner scanner = new Scanner(System.in); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Calculates the amount of tax to deduct | |
* from gross monthly pay. | |
* No tax is taken on the first £375 | |
* 10% is taken on the next £225 | |
* and 23% is taken on what remains | |
* @param grossPay - An employees gross pay | |
*/ | |
public void taxCalc(double grossPay) { | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package practical2p3.uk.ac.qub; | |
public class CaesarCypher { | |
public CaesarCypher(){ | |
} | |
public CaesarCypher (String stringToEncode, int codeKey) { | |
this.stringToEncode = stringToEncode; |
OlderNewer