Jump to content

panodil

Members
  • Content Count

    3
  • Joined

  • Last visited

Community Reputation

0 Neutral

About panodil

  • Rank
    Newbie
  • Birthday 12/29/1973

Previous Fields

  • Languages
    Java, JavaScript, Jquery, vb.net, SQL, XML

Contact Methods

  • Website URL
    http://www.nyttigbras.dk

Profile Information

  • Location
    Denmark
  • Interests
    Java programmering and web development.
    I use a lot of my time on HTML and JavaScript.
    Recently I have started to look into PHP.
  1. Pretty straight forward. You are missing the class QuizCard: You are creating an instance in here: QuizCard card = new QuizCard(question.getText(), answer.getText()); Of course you need to have that class in the project. public class QuizCard{ String question,answer; public QuizCard(){} public QuizCard(String q,String a){ question=q; answer=a; } public String getQuestion(){return question;} public String getAnswer(){return answer;} } Result:
  2. Here is a working solution: Please notice I changed the array type from string to double import java.util.Scanner; public class morePay2 { public static double wageCalc(double ratE, double hourS){return (ratE * hourS);} public static void main(String[] args) { Scanner input = new Scanner(System.in); int numWorkers = 0, i = 1; double intWorkedHours = 0, intHourlyRate = 0; System.out.print("Please type in the number of workers: "); numWorkers = input.nextInt();String[] nameWorker = new String[numWorkers];String[] hourlyRate = new String[numWorkers];String[] workedHours = new String[numWork
  3. Yes, and it would also make sense to be carefull with the variable naming. Notice you are using 'i' multiple times. That can lead to problems. Try to read about the scope of variables and naming convention. It will make your code more readable.
×
×
  • Create New...