Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8631211
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T09:11:16+00:00 2026-06-12T09:11:16+00:00

Basically, at my University, we’ve been given a Finch Robot to work with and

  • 0

Basically, at my University, we’ve been given a Finch Robot to work with and help us develop our Java programming skills. However, I have a slight problem. The Uni uses Windows machines and I use a Mac, and basically we’ve been given pre-written code to test out our Finch Robot. When I copy and paste the code in the WIndows machine, Eclipse gives me no errors whatsoever, and I can go ahead and test the Robot out, but when I attempt the same thing on the Mac, I get 30 errors!! I have no idea what I’m doing wrong.

Here is the code (I’ve pasted the errors below the code):

import java.util.Random;
import javax.swing.JOptionPane;
import edu.cmu.ri.createlab.terk.robot.finch.Finch;

public class DoesMyFinchWork 
   {
//This value is the time for most of the tests in milliseconds, 1000 = 1 second
//Change this value if the tests are too long or short
final private static int testtime = 5000;
//This is the Finch object
private static Finch myf = null;
//This is the starting point of the testing program
public static void main(String args[]) 
{
    String s = "";
    //'myf' is the name of our Finch object
    //This will used throughout the program to control your Finch and report it's status  
    myf = new Finch();
    do
    {
        //Run the menu until quit or cancel is selected
        s = FinchMenu();
        if (s == "Light Test") RunLightTest(s);
        if (s == "Tilt Test") RunTiltTest(s);
        if (s == "Tap Test") RunTapTest(s);
        if (s == "Temperature Test") RunTemperatureTest(s);
        if (s == "Obstacle Test") RunObstacleTest(s);
        if (s == "Acceleration Test") RunAccelerationTest(s);
        if (s == "Left Wheel Test") RunLeftWheelTest(s);
        if (s == "Right Wheel Test") RunRightWheelTest(s);
        if (s == "Buzzer Test") RunBuzzerTest(s);
        if (s == "Nose Test") RunNoseTest(s);
    } while (s != "Quit"); 
    System.out.println("Exiting DoesMyFinchWork...");
    myf.quit();
}
//This creates the Finch menu
private static String FinchMenu()
{
    Object[] possibilities = {"Light Test", "Tilt Test","Tap Test","Temperature Test", "Obstacle Test","Acceleration Test","Left Wheel Test","Right Wheel Test","Buzzer Test","Nose Test","Quit"};
    String s = (String)JOptionPane.showInputDialog(null,"Dr Swift's Splendid Finch Test\n++++++++++++++++++++++++\nChoose a test from:\n\n","Week Zero Laboratory",JOptionPane.PLAIN_MESSAGE, null,possibilities,"Light Test");
    if (s == null || s.length() == 0) s = "Quit";
    return(s);
}
//Run the light sensor test
//Displays the left and then the right sensor output
private static void RunLightTest(String s)
{
    System.out.println("\n"+"Running: "+s+"\n");
    long before = System.currentTimeMillis();
    while(System.currentTimeMillis() - before < testtime)
    {
        System.out.println(myf.getLeftLightSensor() + " " + myf.getRightLightSensor());
    }
}
//Run the Tilt Test
//Displays:
//1) Is the beak down?
//2) Is the beak up?
//3) Is the Finch level?
//4) Is the Finch upside down?
//5) Is the Finch's left wing down?
//6) Is the Finch's right wing down?
private static void RunTiltTest(String s)
{
    System.out.println("\n"+"Running: "+s+"\n");
    long before = System.currentTimeMillis();
    while(System.currentTimeMillis() - before < testtime)
    {
        System.out.println(myf.isBeakDown() + " " + myf.isBeakUp() + " " + myf.isFinchLevel() + " " + myf.isFinchUpsideDown() + " " + myf.isLeftWingDown() + " " + myf.isRightWingDown());
    }
}
//Run the tap test
//Displays if the Finch has been tapped
private static void RunTapTest(String s)
{
    System.out.println("\n"+"Running: "+s+"\n");
    long before = System.currentTimeMillis();
    while(System.currentTimeMillis() - before < testtime)
    {
        System.out.println(myf.isTapped());
    }
}
//Run the temperature test
//Displays the current temperature in degrees Celsius
private static void RunTemperatureTest(String s)
{
    System.out.println("\n"+"Running: "+s+"\n");
    long before = System.currentTimeMillis();
    while(System.currentTimeMillis() - before < testtime)
    {
        System.out.println(myf.getTemperature());
    }
}
//Run the obstacle sensor test
//Displays if there is an obstacle left and right of the Finch
private static void RunObstacleTest(String s)
{
    System.out.println("\n"+"Running: "+s+"\n");
    long before = System.currentTimeMillis();
    while(System.currentTimeMillis() - before < testtime)
    {
        System.out.println(myf.isObstacleLeftSide() + " " + myf.isObstacleRightSide());
    }
}
//Run the acceleration sensor test
//Displays is the Finch is being shaken, and then the acceleration in the X, Y and Z planes
private static void RunAccelerationTest(String s)
{
    System.out.println("\n"+"Running: "+s+"\n");
    long before = System.currentTimeMillis();
    while(System.currentTimeMillis() - before < testtime)
    {
        System.out.println(myf.isShaken()+ " " + myf.getXAcceleration() + " " + myf.getYAcceleration()+ " " + myf.getZAcceleration());
    }
}
//Run the left wheel test
//Move the left wheel forward and backwards
private static void RunLeftWheelTest(String s)
{
    System.out.println("\n"+"Running: "+s+"\n");
    myf.setWheelVelocities(255,0,testtime/2);
    myf.setWheelVelocities(-255,0,testtime/2);
}
//Run the right wheel test
//Move the right wheel forward and backwards
private static void RunRightWheelTest(String s)
{
    System.out.println("\n"+"Running: "+s+"\n");
    myf.setWheelVelocities(0,255,testtime/2);
    myf.setWheelVelocities(0,-255,testtime/2);
}
//Sound the buzzer for a number of different frequencies
private static void RunBuzzerTest(String s)
{
    System.out.println("\n"+"Running: "+s+"\n");
    for(int i=0;i<=5000;i+=10)
    {
        myf.buzz(i,10);
        long before = System.currentTimeMillis();
        while(System.currentTimeMillis() - before < 10)
        {
            //Do nothing...
        }
    }
}
//Flash the Finch's nose red, green and blue
//Then flash it randomly
private static void RunNoseTest(String s)
{
    System.out.println("\n"+"Running: "+s+"\n");
    for(int r=0;r<=255;r+=5)
    {
        myf.setLED(r,0,0,10);
    }
    for(int g=0;g<=255;g+=5)
    {
        myf.setLED(0,g,0,10);
    }
    for(int b=0;b<=255;b+=5)
    {
        myf.setLED(0,0,b,10);
    }
    Random rand = new Random();
    rand.setSeed(System.currentTimeMillis());
    for(int i=0;i<50;++i)
    {
        int r = Math.abs(rand.nextInt() % 255);
        int g = Math.abs(rand.nextInt() % 255);
        int b = Math.abs(rand.nextInt() % 255);
        myf.setLED(r,g,b,5);
    }
}

}

Here are some of the errors (All 30 errors say ‘Finch cannot be resolved to a type’):

Description Resource    Path    Location    Type
Finch cannot be resolved to a type  DoesMyFinchWork.java    /DoesMyFinchWork/src    line 169    Java
Problem          
Finch cannot be resolved to a type  DoesMyFinchWork.java    /DoesMyFinchWork/src    line 165    Java   
Problem
Finch cannot be resolved to a type  DoesMyFinchWork.java    /DoesMyFinchWork/src    line 161    Java  
Problem
Finch cannot be resolved to a type  DoesMyFinchWork.java    /DoesMyFinchWork/src    line 146    Java

Thanks a-lot for your help!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T09:11:18+00:00Added an answer on June 12, 2026 at 9:11 am

    In eclipse just find the jar of Finch, the copy-paste it in a folder of your project (hopefully you have a lib folder), the right-click on that file Build Path > Add to Build Path

    and that should solve the problem.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I had a work for the university which basically said: Demonstrates that the non-regular
My project is a visitor app for a University, that basically displays places and
I'm a university student learning programming. For practice I'm writing a blackjack program. I'm
At my university we regurly get programming assignments that (at least for now) usually
In my university days I came across a Java app in one of my
I have been working for several months on a RoR project with fellows university
I'm doing this project for university, which is basically a movie database and for
I have a BasePage.java (together with a BasePage.html ). My base page is basically
I'm doing a bit of coursework for university and I'm completely baffled. Basically I've
Okay so I've been set an assignment from university and I just can't get

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.