Need help understanding a project please

Hi, i just finished reading through this lab that i'm supposed to do, but have no idea what i am supposed to do. Could anyone here possibly help me understand it in an easier fashion? I would really appreciate it.
Assignment:
For this assignment, we will create a number class that can help us create classes for objects like clocks or angles. The number class will have to be general enough so that we can define different bases for it. Clocks need numbers of base 24 (or 12) and 60. Angles need numbers of base 360 and 60. For now, we are going to simplify things and only define constructors, a toString method, and an increment method. Of course, a complete number class would have many other methods, such as adding, subtracting, multiplying, comparing, and negating the numbers. Since a number is made up of digits, we will also define a digit class. The number and digit classes appear very similar because they have nearly the same methods. The differences are in the implementations of the methods.
Write a number class that represents a number with a given base. The number class has two constructors. The default constructor sets the base at 10 and the value to 0. The other constructor accepts a decimal value and a base. The constructors will have to create all of the digits (as objects of the digit class) and store them in some kind of list. Create a toString method and an increment method. These two methods will use the corresponding methods of the digit class to do most of the work for them.
Write a digit class that represents a single digit with a given base. The digit class has two constructors. The default constructor sets the base at 10 and the value to 0. The other constructor accepts a decimal value and a base. Create a toString method and an increment method. The increment method should return a boolean: true if there is a carry and false if not.
For both classes, you can assume that the bases are restricted to binary, octal, decimal or hexadecimal and the values are non-negative.
Instructions:
Write a test driver that proves that your classes work.

Myrdwin wrote:
It's not that i didn't bother to ask him earlierSo, your teacher gave you the assignment, without giving you any opportunity to talk to him between when he assigned it and when it's due?
I just finished the polymorphism lab with a bunch of farm animals last night. WHOAH! TMI!!! ;-)
Am i just reading into the lesson to much and making it way more complicated than it actually is?Like I said, I'm not going to try to interpret the whole thing for you but a) It tells you what to do with the c'tors, and b) I would always assume that "create a method" or "define a method" or whatever he says means "create a *fully functional, correct* method", unless he explicitly states to leave it empty for now.
My advice is to use your best judgment as to what's expected, and get started on that basis. At your first opportunity to speak to your teacher, explain your uncertainty and the assumptions you made.
If you have specific questions along the way, post them here, along with your code or an SSCCE.
When you post code, use the CODE button or [code] and [/code] tags to preserve formatting and make your code readable.
Edited by: jverd on Oct 3, 2008 11:57 AM

Similar Messages

  • Uloading ebook using iProducer rec'd error: ERROR ITMS-9000: "Unable to parse nav file: toc.ncx" at Book. I don't understand and need help fixing it. Please Help

    Uloading ebook using iProducer rec'd error: ERROR ITMS-9000: "Unable to parse nav file: toc.ncx" at Book. I don't understand and need help fixing it. Please Help if you've the knowledge.
    Many Thanks

    Yep, i just did it again. The entire scroll-bar widget, complete with formatted text, graphics, etc., pasted itself nicely in another book. Two different files, the same widget.
    I use the scroll-bar widgets for most of my texts. (I have audio buttons on the side, and the scripts are within the widget, to the side). My only text is within widgets, and text boxes, naturally. 
    I am following your recommendation: cleaning files, etc. I am remaking the book anew. I need to convince the EPUB bot or whatever that my file looks and works nicely on all my devices. You would expect an error message when previewing the book: 'Hey Amigo, your file is flawed, stop working on it, and get back to the drawing board." Should be able to try again next Monday.

  • I need help organising my iPhoto please

    Can someone help me with my iPhoto.
    I have 14,400 photos in my iPhoto library.
    I have albums which contain the photos from the library,as I assumed once you created an album it would eliminate them from the library.
    Consequently I have lots of albums with what I thought was trying to was create some order ...but instead it's left me with photos everywhere.
    To create more dilema,I lost my hard-drive a few years ago and had not backed up any photos(5 years worth)....luckily for me my brother had backed up some and put them back into iPhoto for me but for some reason I now have 3 and 4 of the same photo.
    To make it more annoying the photos whilst there may be 3 of the same they are all different pixel sizes?Not sure how this happened?
    I've also got 3,300 photos in trash that I'm too scared to delete incase I don't have that exact photo in the library.
    Is there any easy way to sort this out,because the problem is getting worse as I try to create order?
    Is it possible to organize them all into folders that way I can delete them from the library and trash ?
    Thanks in advance

    leonieDF Hamburg, Germany
    Re: I need help organising my iPhoto please 
    Apr 6, 2013 9:07 AM (in response to flyinghostie)
    Would you mind to clarify a few points, please?
    I have 14,400 photos in my iPhoto library.
    o.k.
    I have albums which contain the photos from the library,as I assumed once you created an album it would eliminate them from the library.
    Consequently I have lots of albums with what I thought was trying to was create some order ...but instead it's left me with photos everywhere.
    That part is not clear to me.
    What kind of albums are you talking about? Do you mean iPhoto albums as seen in the "Albums" section of the source list?
    Yes the albums are contained in the Albums section
    as I assumed once you created an album it would eliminate them from the library.
    Albums will index and organize the photos in your library, but not store them and not remove them from the library. All photos need to be contained in an event. When you are referring to "library", are you referring to your iPhoto library or to the "Library" section in the source list in the iPhoto window?
    Yes the library I'm referring to is the Iphoto library.I do have Events also...will organising Events take them out of my Libraray?
    .but instead it's left me with photos everywhere.
    Perhaps you are confused by iPhoto showing you different views of the same photos.
    The top part of the source list "Library" gives you access to all your photos based on the events, as list of all "Photos", organized by the Faces, or organized by the Places. You can access the same photos in four different ways.
    The "Recent" section gives you access based on the date; but again you will see the very same photos, only grouped differently.
    These are the access paths predefined by iPhoto. The "Albums" section and "Projects" section will give you additional custom structures to retrieve your photos, the access structure you define yourself. But it will not remove the default organisation created by iPhoto, only supplement it with your own custom structures.
    To make it more annoying the photos whilst there may be 3 of the same they are all different pixel sizes?Not sure how this happened?
    Now, this is probably caused by the way you reimported your photos into your new library. When you take the folders from an iPhoto library and simply import all folders, you will import each photo in three different sizes, for the library contains thumbnails, previews, and full size original image files and versions.
    Would it be possible for you to repeat the import step from the backup your brother has made for you? It might be easier to sort your photos in the finder by size and only to import the full size image files, then to do that manually. What is the backup like, that your brother has made? Is it an iPhoto library or a folder containing photos and folders of your old iPhoto library?
    I'm not sure how my brother saved the photos as it's been years since he re imported them for me,I'd rather do this myself than trouble him again.I've thought maybe I can set up a folder on my desktop and drag all the main photos from the library into there,then delete iPhoto and start all over again?
    But before you proceed with deleting photos that you are not sure about, create a backup of the library, so you will be safe, if you accidentally delete too much.
    Regards
    Léonie

  • I need help understanding how the Apple components integrate to create a system across all my devices?

    I need help understanding how the Apple components connect to create a whole system across all my devices?
    Is there a resource that describes current system and associated functionality?
    For example:
    Buy A, B, C to achieve "X" 
    You will need:
    an internet provider which supports <specs>
    add D to achieve "Y"
    You will need:
    an internet provider which supports <specs>
    add "E" to achieve "Z"
    You will need:
    an internet provider which supports <specs>
    For example, I am looking at the Gen 6 Airport extreme.  For intended performance do I need broadband? if so what are the specs, or will basic internet service suffice?  Do I need the internet provider's modem or does the Airport extreme replace that?  And then I think, if I am doing this, I should also look at Apple TV....What do I need and Why?  Then I look at the New Desk top coming out in the fall, and I think well, if I wait and get this, what does this component do for the system, and what becomes redundant? What does this awesome desktop do for my ability to sit and use a new macbook air when I travel  or sit on the couch in my PJs?
    If there was a place that plainly stated "if you buy the new dektop you can configure a system including only these components and achieve <this result> and by adding <additional components> you will achieve this result.
    I have been to the genius store a few times, but I come out of there more confused unless I have SPECIFIC questions or already know what to buy. 
    A "System Configuration App" would be a really great sales tool--Just saying.

    I have no idea what "fully optimized" means.
    No Apple device will let you watch broadcast TV. The Apple TV is a good option for watching streaming TV from iTunes, NetFlix and Hulu. If you want to watch from other sources, you may need to look at other devices.
    Any Mac computer or iPad will allow you to surf the web.
    What business software?
    Time Capsule is a good option for back ups.
    Update what across all devices?
    For accessing documents from all devices, a service like Dropbox is your best bet.
    I have no idea what "step as far away from an internet provider as possible" means. If you want Internet access, you need an Internet provider.
    Lighting fast speed for what? Processor? The specs are listed for all devices in the Online Store. Internet? We're back to the service provider.
    Technology changes. The only way to keep pace with it beyond a couple of years is to buy new stuff.
    The bottom line is you need to look at the specs for devices availble and at your budget and decide what best meets your needs. If you are unable to do that on your own, there are lot of technology consultants out there who will, for a fee, look at your exact situation, make recommendations and even handle the purchase and set up. Perhaps that would be the best route for you.
    Best of luck.

  • My Mac was updated to Ÿosemite OS and since then the PS5 software doesn't open. I need help on this subject please.

    My Mac was updated to Ÿosemite OS and since then the PS5 software doesn't open. I need help on this subject please.
    They error message I get is "An unexpected and unrecoverable problem has occurred. Photoshop will now exit."
    This only started after I upgraded my OS to Yosemite.

    The upgrade has been know to break Photoshop CS5 installs. An Uninstall/Reinstall may be necessary.

  • Need help with calculator project for an assignment...

    Hi all, I please need help with my calculator project that I have to do for an assignment.
    Here is the project's specifications that I need to do"
    """Create a console calculator applicaion that:
    * Takes one command line argument: your name and surname. When the
    program starts, display the date and time with a welcome message for the
    user.
    * Display all the available options to the user. Your calculator must include
    the arithmetic operations as well as at least five scientific operations of the
    Math class.
    -Your program must also have the ability to round a number and
    truncate it.
    -When you multiply by 2, you should not use the '*' operator to perform the
    operation.
    -Your program must also be able to reverse the sign of a number.
    * Include sufficient error checking in your program to ensure that the user
    only enters valid input. Make use of the String; Character, and other
    wrapper classes to help you.
    * Your program must be able to do conversions between decimal, octal and
    hex numbers.
    * Make use of a menu. You should give the user the option to end the
    program when entering a certain option.
    * When the program exits, display a message for the user, stating the
    current time, and calculate and display how long the user used your
    program.
    * Make use of helper classes where possible.
    * Use the SDK to run your program."""
    When the program starts, it asks the user for his/her name and surname. I got the program to ask the user again and again for his/her name and surname
    when he/she doesn't insert anything or just press 'enter', but if the user enters a number for the name and surname part, the program continues.
    Now my question is this: How can I restrict the user to only enter 'letters' (and spaces of course) but allow NO numbers for his/her surname??
    Here is the programs code that I've written so far:
    {code}
    import java.io.*;
    import java.util.*;
    import java.text.*;
    public class Project {
         private static String nameSurname = "";     
         private static String num1 = null;
         private static String num2 = null;
         private static String choice1 = null;
         private static double answer = 0;
         private static String more;
         public double Add() {
              answer = (Double.parseDouble(num1) + Double.parseDouble(num2));
              return answer;
         public double Subtract() {
              answer = (Double.parseDouble(num1) - Double.parseDouble(num2));
              return answer;
         public double Multiply() {
              answer = (Double.parseDouble(num1) * Double.parseDouble(num2));
              return answer;
         public double Divide() {
              answer = (Double.parseDouble(num1) / Double.parseDouble(num2));
              return answer;
         public double Modulus() {
              answer = (Double.parseDouble(num1) % Double.parseDouble(num2));
              return answer;
         public double maximumValue() {
              answer = (Math.max(Double.parseDouble(num1), Double.parseDouble(num2)));
              return answer;
         public double minimumValue() {
              answer = (Math.min(Double.parseDouble(num1), Double.parseDouble(num2)));
              return answer;
         public double absoluteNumber1() {
              answer = (Math.abs(Double.parseDouble(num1)));
              return answer;
         public double absoluteNumber2() {
              answer = (Math.abs(Double.parseDouble(num2)));
              return answer;
         public double Squareroot1() {
              answer = (Math.sqrt(Double.parseDouble(num1)));
              return answer;
         public double Squareroot2() {
              answer = (Math.sqrt(Double.parseDouble(num2)));
              return answer;
         public static String octalEquivalent1() {
              int iNum1 = Integer.parseInt(num1);
    String octal1 = Integer.toOctalString(iNum1);
    return octal1;
         public static String octalEquivalent2() {
              int iNum2 = Integer.parseInt(num2);
              String octal2 = Integer.toOctalString(iNum2);
              return octal2;
         public static String hexadecimalEquivalent1() {
              int iNum1 = Integer.parseInt(num1);
              String hex1 = Integer.toHexString(iNum1);
              return hex1;
         public static String hexadecimalEquivalent2() {
              int iNum2 = Integer.parseInt(num2);
              String hex2 = Integer.toHexString(iNum2);
              return hex2;
         public double Round1() {
              answer = Math.round(Double.parseDouble(num1));
              return answer;
         public double Round2() {
              answer = Math.round(Double.parseDouble(num2));
              return answer;
              SimpleDateFormat format1 = new SimpleDateFormat("EEEE, dd MMMM yyyy");
         Date now = new Date();
         SimpleDateFormat format2 = new SimpleDateFormat("hh:mm a");
         static Date timeIn = new Date();
         public static long programRuntime() {
              Date timeInD = timeIn;
              long timeOutD = System.currentTimeMillis();
              long msec = timeOutD - timeInD.getTime();
              float timeHours = msec / 1000;
                   return (long) timeHours;
         DecimalFormat decimals = new DecimalFormat("#0.00");
         public String insertNameAndSurname() throws IOException{
              boolean inputCorrect = false;
                   while (inputCorrect == false) {
                        while (nameSurname == null || nameSurname.length() == 0) {
                             for (int i = 0; i < nameSurname.length(); i++) {
                             if ((nameSurname.charAt(i) > 'a') && (nameSurname.charAt(i) < 'Z')){
                                       inputCorrect = true;
                        else{
                        inputCorrect = false;
                        break;
                        try {
                             BufferedReader inStream = new BufferedReader (new InputStreamReader(System.in));
                             System.out.print("Please enter your name and surname: ");
                             nameSurname = inStream.readLine();
                             inputCorrect = true;
                        }catch (IOException ex) {
                             System.out.println("You did not enter your name and surname, " + nameSurname + " is not a name, please enter your name and surname :");
                             inputCorrect = false;
                        System.out.println("\nA warm welcome " + nameSurname + " ,todays date is: " + format1.format(now));
                        System.out.println("and the time is now exactly " + format2.format(timeIn) + ".");
                        return nameSurname;
              public String inputNumber1() throws IOException {
              boolean inputCorrect = false;
                   while (inputCorrect == false) {
                        try {
                             BufferedReader br = new BufferedReader (new InputStreamReader(System.in));
                             System.out.print("\nPlease enter a number you want to do a calculation with and hit <ENTER>: ");
                             num1 = br.readLine();
                             double number1 = Double.parseDouble(num1);
                             System.out.println("\nThe number you have entered is: " + number1);
                             inputCorrect = true;
                        } catch (NumberFormatException nfe) {
                             System.out.println("\nYou did not enter a valid number: " + "\""+ num1 + "\" is not a number!!");
                             inputCorrect = false;
                        return num1;
         public String calculatorChoice() throws IOException {
              System.out.println("Please select an option of what you would like to do with this number from the menu below and hit <ENTER>: ");
              System.out.println("\n*********************************************");
              System.out.println("---------------------------------------------");
              System.out.println("Please select an option from the list below: ");
              System.out.println("---------------------------------------------");
              System.out.println("1 - Add");
              System.out.println("2 - Subtract");
              System.out.println("3 - Multiply");
              System.out.println("4 - Divide (remainder included)");
              System.out.println("5 - Maximum and minimum value of two numbers");
              System.out.println("6 - Squareroot");
              System.out.println("7 - Absolute value of numbers");
              System.out.println("8 - Octal and Hexadecimal equivalent of numbers");
              System.out.println("9 - Round numbers");
              System.out.println("0 - Exit program");
              System.out.println("**********************************************");
              boolean inputCorrect = false;
                   while (inputCorrect == false) {
                        try {
                             BufferedReader inStream = new BufferedReader (new InputStreamReader(System.in));
                             System.out.print("Please enter your option and hit <ENTER>: ");
                             choice1 = inStream.readLine();
                             int c1 = Integer.parseInt(choice1);
                             System.out.println("\nYou have entered choice number: " + c1);
                             inputCorrect = true;
                        } catch (NumberFormatException nfe) {
                             System.out.println("You did not enter a valid choice number: " + "\""+ choice1 + "\" is not in the list!!");
                             inputCorrect = false;
                        return choice1;
         public String inputNumber2() throws IOException {
              boolean inputCorrect = false;
                   while (inputCorrect == false) {
                        try {
                             BufferedReader br2 = new BufferedReader (new InputStreamReader(System.in));
                             System.out.print("\nPlease enter another number you want to do the calculation with and hit <ENTER>: ");
                             num2 = br2.readLine();
                             double n2 = Double.parseDouble(num2);
                             System.out.println("\nThe second number you have entered is: " + n2);
                             System.out.println("\nYour numbers are: " + num1 + " and " + num2);
                             inputCorrect = true;
                        } catch (NumberFormatException nfe) {
                             System.out.println("You did not enter a valid number: " + "\""+ num2 + "\" is not a number!!");
                             inputCorrect = false;
                        return num2;
         public int Calculator() {
              int choice2 = (int) Double.parseDouble(choice1);
              switch (choice2) {
                        case 1 :
                             Add();
                             System.out.print("The answer of " + num1 + " + " + num2 + " is: " + decimals.format(answer));
                             break;
                        case 2 :
                             Subtract();
                             System.out.print("The answer of " + num1 + " - " + num2 + " is: " + decimals.format(answer));
                             break;
                        case 3 :
                             Multiply();
                             System.out.print("The answer of " + num1 + " * " + num2 + " is: " + decimals.format(answer));
                             break;
                        case 4 :
                             Divide();
                             System.out.print("The answer of " + num1 + " / " + num2 + " is: " + decimals.format(answer));
                             Modulus();
                             System.out.print(" and the remainder is " + decimals.format(answer));
                             break;
                        case 5 :
                             maximumValue();
                             System.out.println("The maximum number between the numbers " + num1 + " and " + num2 + " is: " + decimals.format(answer));
                             minimumValue();
                             System.out.println("The minimum number between the numbers " + num1 + " and " + num2 + " is: " + decimals.format(answer));
                             break;
                        case 6 :
                             Squareroot1();
                             System.out.println("The squareroot of value " + num1 + " is: " + decimals.format(answer));
                             Squareroot2();
                             System.out.println("The squareroot of value " + num2 + " is: " + decimals.format(answer));
                             break;
                        case 7 :
                             absoluteNumber1();
                             System.out.println("The absolute number of " + num1 + " is: " + decimals.format(answer));
                             absoluteNumber2();
                             System.out.println("The absolute number of " + num2 + " is: " + decimals.format(answer));
                             break;
                        case 8 :
                             octalEquivalent1();
                             System.out.println("The octal equivalent of " + num1 + " is: " + octalEquivalent1());
                             octalEquivalent2();
                             System.out.println("The octal equivalent of " + num2 + " is: " + octalEquivalent2());
                             hexadecimalEquivalent1();
                             System.out.println("\nThe hexadecimal equivalent of " + num1 + " is: " + hexadecimalEquivalent1());
                             hexadecimalEquivalent2();
                             System.out.println("The hexadecimal equivalent of " + num2 + " is: " + hexadecimalEquivalent2());
                             break;
                        case 9 :
                             Round1();
                             System.out.println("The rounded number of " + num1 + " is: " + decimals.format(answer));
                             Round2();
                             System.out.println("The rounded number of " + num2 + " is: " + decimals.format(answer));
                             break;
                        case 0 :
                             if (choice2 == 0) {
                                  System.exit(1);
                             break;
                   return choice2;
              public String anotherCalculation() throws IOException {
                   boolean inputCorrect = false;
                   while (inputCorrect == false) {
                             try {                              
                                  BufferedReader br3 = new BufferedReader (new InputStreamReader(System.in));
                                  System.out.print("\nWould you like to do another calculation? Y/N ");
                                  more = br3.readLine();
                                  String s1 = "y";
                                  String s2 = "Y";
                                  if (more.equals(s1) || more.equals(s2)) {
                                       inputCorrect = true;
                                       while (inputCorrect = true){
                                            inputNumber1();
                                            System.out.println("");
                                            calculatorChoice();
                                            System.out.println("");
                                            inputNumber2();
                                            System.out.println("");
                                            Calculator();
                                            System.out.println("");
                                            anotherCalculation();
                                            System.out.println("");
                                            inputCorrect = true;
                                  } else {
                                       System.out.println("\n" + nameSurname + " thank you for using this program, you have used this program for: " + decimals.format(programRuntime()) + " seconds");
                                       System.out.println("the program will now exit, Goodbye.");
                                       System.exit(0);
                             } catch (IOException ex){
                                  System.out.println("You did not enter a valid answer: " + "\""+ more + "\" is not in the list!!");
                                  inputCorrect = false;
              return more;
         public static void main(String[] args) throws IOException {
              Project p1 = new Project();
              p1.insertNameAndSurname();
              System.out.println("");
              p1.inputNumber1();
              System.out.println("");
              p1.calculatorChoice();
              System.out.println("");
              p1.inputNumber2();
              System.out.println("");
              p1.Calculator();
                   System.out.println("");
                   p1.anotherCalculation();
                   System.out.println("");
    {code}
    *Can you please run my code for yourself and have a look at how this program is constructed*
    *and give me ANY feedback on how I can better this code(program) or if I've done anything wrong from your point of view.*
    Your help will be much appreciated.
    Thanks in advance

    Smirre wrote:
    Now my question is this: How can I restrict the user to only enter 'letters' (and spaces of course) but allow NO numbers for his/her surname??You cannot restrict the user. It is a sad fact in programming that the worst bug always sits in front of the Computer.
    What you could do is checking the input string for numbers. If it contains numbers, just reprompt for the Name.
    AND you might want to ask yourself why the heck a calculator needs to know the users Name.

  • Need help with a project

    Hi,
    I'm a final year engineering student doing my project on cloud computing. Our project is a web application developed which concerns the issue of cloud security.Our lecturers asked us to put it on the cloud instead of showing it as a web application. So we
    are trying the trial version of Windows Azure. I need help in putting my project on to the cloud. Please help regarding this as soon as possible... 
    We are using Apache tomcat, JDK 1.6, Wamp server for our web application and we have developed this using netbeans IDE
    Very Urgent!!!

    Hello there, if you're still looking for help you might not be in the right forum.  This fourm is all about Azure SQL Database.

  • I need help In my project

    Hi
    Iam computer engineering student, Iam working on design course
    The idea of my project is to use both speech to text and text to speech code to help deaf people to communicate with others using a telephone.
    Can u tell me if I can use java code for "voice recognition" and java code for text to speech in my project?
    I my idea impossible or can i work on it please tell me I need help.
    thanx alot

    heloo sir..
    i have a small doubt in setting the size of the panel...i.e...code as follows..
    public class ImageRegion extends JPanel
    out side the class i creted the object of that class i.e..
    imageRegion = new ImageRegion( ) ;
    and an image(has specified size) is dispalayed inside the object panel ..
    so im not able to set the size of the object Panel..i used setSize() and setPreferedSize() methods but im getting the height and width as zero if i try to print the size by using the getHeight() and getWidth() methods..
    please help me..and replay to this mail as early as possible..
    Regards..
    VIVEK
    --------------------------------------------------------------------------------

  • I have problem with buying in games , I got the massage that the purchased can not be completed , please contact iTunes support.. I need help for my case please

    I have problem with buying in games , I got the massage that the purchased can not be completed , please contact iTunes support.. I need help for my case please

    http://www.apple.com/support/itunes/contact/

  • I need help with this script please ASAP

    So I need this to work properly, but when ran and the correct answer is chosen the app quits but when the wrong answer is chosen the app goes on to the next question. I need help with this ASAP, it is due tommorow. Thank you so much for the help if you can.
    The script (Sorry if it's a bit long):
    #------------Startup-------------
    display dialog "Social Studies Exchange Trviva Game by Justin Parzik" buttons {"Take the Quiz", "Cyaaaa"} default button 1
    set Lolz to (button returned of the result)
    if Lolz is "Cyaaaa" then
    killapp()
    else if Lolz is "Take the Quiz" then
              do shell script "say -v samantha Ok starting in 3…2…1…GO!"
    #------------Question 1-----------
              display dialog "Around age 11, many boys left their fathers to become…" buttons {"Scholars", "Warriors", "Apprentices"}
              set A1 to (button returned of the result)
              if A1 is "Apprentices" then
                        do shell script "say -v samantha Correct Answer"
              else
                        do shell script "say -v samantha Wrong Answer"
      #----------Question 2--------
                        display dialog "Most children were taught
    to read so that they could understand the…" buttons {"Music of Mozart", "Bible", "art of cooking"}
                        set A2 to (button returned of the result)
                        if A2 is "Bible" then
                                  do shell script "say -v samantha Correct Answer"
                        else
                                  do shell script "say -v samantha Wrong Answer"
      #------------Question 3---------
                                  display dialog "In the 1730s and 1740s, a religious movement called the_______swept through the colonies." buttons {"Glorius Revolution", "Great Awakening", "The Enlightenment"}
                                  set A3 to (button returned of the result)
                                  if A3 is "Great Awakening" then
                                            do shell script "say -v samantha Correct Answer"
                                  else
                                            do shell script "say -v samantha Wrong Answer"
      #-----------Question 4--------
                                            display dialog "_______ was
    a famous American Enlightenment figure." buttons {"Ben Franklin", "George Washington", "Jesus"}
                                            set A4 to (button returned of the result)
                                            if A4 is "Ben Franklin" then
                                                      do shell script "say -v samantha Correct Answer"
                                            else
                                                      do shell script "say -v samantha Wrong Answer"
      #----------Question 5-------
                                                      display dialog "______ ownership gave colonists political rights as well as prosperity." buttons {"Land", "Dog", "Slave"}
                                                      set A5 to (button returned of the result)
                                                      if A5 is "Land" then
                                                                do shell script "say -v samantha Correct Answer"
                                                      else
                                                                do shell script "say -v samantha Wrong Answer"
      #---------Question 6--------
                                                                display dialog "The first step toward guaranteeing these rights came in 1215. That
    year, a group of English noblemen forced King John to accept the…" buttons {"Declaration of Independence", "Magna Carta", "Constitution"}
                                                                set A6 to (button returned of the result)
                                                                if A6 is "Magna Carta" then
                                                                          do shell script "say -v samantha Correct Answer"
                                                                else
                                                                          do shell script "say -v samantha Wrong Answer"
      #----------Question 7--------
                                                                          display dialog "England's cheif lawmaking body was" buttons {"the Senate", "Parliament", "King George"}
                                                                          set A7 to (button returned of the result)
                                                                          if A7 is "Parliament" then
                                                                                    do shell script "say -v samantha Correct Answer"
                                                                          else
                                                                                    do shell script "say -v samantha Wrong Answer"
      #--------Question 8-----
                                                                                    display dialog "Pariliament decided to overthrow _______ for not respecting their rights" buttons {"King James II", "King George", "King Elizabeth"}
                                                                                    set A8 to (button returned of the result)
                                                                                    if A8 is "King James II" then
                                                                                              do shell script "say -v samantha Correct Answer"
                                                                                    else
                                                                                              do shell script "say -v samantha Wrong Answer"
      #--------Question 9------
                                                                                              display dialog "Parliament named ___ and ___ as England's new monarchs in something called ____." buttons {"William/Mary/Glorius Revolution", "Adam/Eve/Great Awakening", "Johhny/Mr.Laphalm/Burning of the hand ceremony"}
                                                                                              set A9 to (button returned of the result)
                                                                                              if A9 is "William/Mary/Glorius Revolution" then
                                                                                                        do shell script "say -v samantha Correct Answer"
                                                                                              else
                                                                                                        do shell script "say -v samantha Wrong Answer"
      #---------Question 10-----
                                                                                                        display dialog "After accepting the throne William and Mary agreed in 1689 to uphold the English Bill of _____." buttons {"Money", "Colonies", "Rights"}
                                                                                                        set A10 to (button returned of the result)
                                                                                                        if A10 is "Rights" then
                                                                                                                  do shell script "say -v samantha Correct Answer"
                                                                                                        else
                                                                                                                  do shell script "say -v samantha Wrong Answer"
      #---------Question 11------
                                                                                                                  display dialog "By the late 1600s French explorers had claimed the ___ River Valey" buttons {"Mississippi", "Ohio", "Hudson"}
                                                                                                                  set A11 to (button returned of the result)
                                                                                                                  if A11 is "Ohio" then
                                                                                                                            do shell script "say -v samantha Correct Answer"
                                                                                                                  else
                                                                                                                            do shell script "say -v samantha Wrong Answer"
      #------Question 12---------
                                                                                                                            display dialog "______ was sent to ask the French to leave 'English Land'." buttons {"Johhny Tremain", "George Washington", "Paul Revere"}
                                                                                                                            set A12 to (button returned of the result)
                                                                                                                            if A12 is "George Washington" then
                                                                                                                                      do shell script "say -v samantha Correct Answer"
                                                                                                                            else
                                                                                                                                      do shell script "say -v samantha Wrong Answer"
      #---------Question 13-------
                                                                                                                                      display dialog "_____ proposed the Albany Plan of Union" buttons {"George Washingon", "Ben Franklin", "John Hancock"}
                                                                                                                                      set A13 to (button returned of the result)
                                                                                                                                      if A13 is "Ben Franklin" then
                                                                                                                                                do shell script "say -v samantha Correct Answer"
                                                                                                                                      else
                                                                                                                                                do shell script "say -v samantha Wrong Answer"
      #--------Question 14------
                                                                                                                                                display dialog "The __________ declared that England owned all of North America east of the Mississippi" buttons {"Proclomation of England", "Treaty of Paris", "Pontiac Treaty"}
                                                                                                                                                set A14 to (button returned of the result)
                                                                                                                                                if A14 is "" then
                                                                                                                                                          do shell script "say -v samantha Correct Answer"
                                                                                                                                                else
                                                                                                                                                          do shell script "say -v samantha Wrong Answer"
      #-------Question 15-------
                                                                                                                                                          display dialog "Braddock was sent to New England so he could ______" buttons {"Command an attack against French", "Scalp the French", "Kill the colonists"}
                                                                                                                                                          set A15 to (button returned of the result)
                                                                                                                                                          if A15 is "Command an attack against French" then
                                                                                                                                                                    do shell script "say -v samantha Correct Answer"
                                                                                                                                                          else
                                                                                                                                                                    do shell script "say -v samantha Wrong Answer"
      #------TheLolQuestion-----
                                                                                                                                                                    display dialog "____ is the name of the teacher who runs this class." buttons {"Mr.White", "Mr.John", "Paul Revere"} default button 1
                                                                                                                                                                    set LOOL to (button returned of the result)
                                                                                                                                                                    if LOOL is "Mr.White" then
                                                                                                                                                                              do shell script "say -v samantha Congratulations…you…have…common…sense"
                                                                                                                                                                    else
                                                                                                                                                                              do shell script "say -v alex Do…you…have…eyes?"
                                                                                                                                                                              #------END------
                                                                                                                                                                              display dialog "I hope you enjoyed the quiz!" buttons {"I did!", "It was horrible"}
                                                                                                                                                                              set endmenu to (button returned of the result)
                                                                                                                                                                              if endmenu is "I did!" then
                                                                                                                                                                                        do shell script "say -v samantha Your awesome"
                                                                                                                                                                              else
                                                                                                                                                                                        do shell script "say -v alex Go outside and run a lap"
                                                                                                                                                                              end if
                                                                                                                                                                    end if
                                                                                                                                                          end if
                                                                                                                                                end if
                                                                                                                                      end if
                                                                                                                            end if
                                                                                                                  end if
                                                                                                        end if
                                                                                              end if
                                                                                    end if
                                                                          end if
                                                                end if
                                                      end if
                                            end if
                                  end if
                        end if
              end if
    end if

    Use code such as:
    display dialog "Around age 11, many boys left their fathers to become…" buttons {"Scholars", "Warriors", "Apprentices"}
    set A1 to (button returned of the result)
    if A1 is "Apprentices" then
    do shell script "say -v samantha Correct Answer"
    else
    do shell script "say -v samantha Wrong Answer"
    return
    end if
    #----------Question 2--------
    display dialog "Most children were taught to read so that they could understand the…" buttons {"Music of Mozart", "Bible", "art of cooking"}
    set A2 to (button returned of the result)
    if A2 is "Bible" then
    do shell script "say -v samantha Correct Answer"
    else
    do shell script "say -v samantha Wrong Answer"
    return
    end if
    (90444)

  • TS5376 I am hopeless, my computer will not uninstall itunes so i can reinstall! i really truly do need help! can someone please give me some guidance? i have tried almost everything and it is still not working!

    I really need help!!! my itunes 11.1.4 download really screwed my computer up! I have tried everything i can search for and i still cant uninstall itunes in order to reinstall. If anyone could please help me it would be muchhhhhhhhh appreaciated. Thanks!

    Carly,
    I went through the same thing. Searched again for another error I was seeing and found this help from Delgadoh and this finally fixed me! He mentioned this article: iTunes 11.1.4 for Windows: Unable to install or open http://support.apple.com/kb/TS5376.  But I had not read it.  I went straight to his instructions below.
    If you haven't already tried these steps:
    Use the Control Panel to uninstall iTunes and related software components in the following order and then restart your computer.
    iTunes
    Apple Software Update
    Apple Mobile Device Support
    Bonjour
    Apple Application Support (iTunes 9 or later)
    Important: Uninstalling these components in a different order, or only uninstalling some of these components may have unintended affects. 

  • Need Help Understanding How To Use iMessage Between Two iPhones

    I have an iPhone 4 and my wife an iPhone 3GS.  We both have iOS 5, but I have discovered something about iMessage I need to make sure I understand correctly.  As I understand it iMessage can send text even if our voice carrier service is unavailable.  I tend to loose signal inside the building I work in.  I usually can get texts in and out, but sometimes not.  But in testing the two phones sending iMessages, I've noticed is that if I have one of the phones with iMessage turned on and the other with iMessage turned off, the two phones will not be able to exchange text.  Is that how it's supposed to work?  Even though one of these phones can receive an iMessage doesn't mean the other one send one back.  Can't the system detect when one phone is connected and another one not, and the one that is not gets sent SMS messages instead?  I don't want to try to send my wife an iMessage because I can't get a voice signal in my building, but her have iMessages turned off and not able to get any messages from me, iMessage or SMS.  I guess I need help better understanding how this actually works between the two phones so I can always get texts back and forth between my wife and I.  My other misgiving is that this iMessage thing consumes my data limit.  My wife gets unlimited because she had her phone before the limits were imposed, but I got on board after, so I am hesitant to use iMessage all the time because of it.  I have no intention to send picture mail through iMessage, but the thing is if I wanted to switch to SMS to send picture mail to save data, but my wife's phone is set to iMessage, she won't get it.  If this is how this thing is supposed to work, I'm not really impressed.  Some insight would be appreciated

    I think you are making this way too complicated. Why are you turning iMessage off? If you are at your office connect to the WiFi there and send your wife messages that way (unless your office is blocking the port iMessage uses). When possible the two phones will use iMessage but will revert to SMS is iMessage is not available if that option is set that way.
    I would not worry about using up your data plan if you have the 2GB, text iMessages are going to be very small and MMS (picture) ones are not very large either. Unless you are sending hundreds of picture iMessages a day you will have a hard time using up your data.
    If you are near an Apple Store you should explore signing up for an intro iPhone course and have them run through iMessage options.

  • Need help for my project(how to call function in ancestor object)

    dear all, i need your help for my project.My problem is stated as follow:
    say i have a class call frameA and frameB, both of them are extend from
    JFrame, frameA structure can be described briefly as follow:
    //frameA.java
    public class frameA extends JFrame{
    private frameB fb;
    public frameA()
    fb=new frameb();
    show();
    public void func()
    JOptionPane.showMessageDialog(null,"OK");
    now, my problem raised, after frameA and fb is created, how can i access the ancestor object(which is frameA) within fb's code,
    what should i add inside frameB? i need the answer urgently......
    thanx a lot!!!
    cheers

    Hi,
    For this kind of problem, I believe you can use the inner class.
    Here's the sample code I hope will help:
    class MyApp{ 
    B bFrame;
    A aFrame;
    class A extends JFrame{
    public void doSomething(){
    bFrame = new B();
    bFrame.doSomething();
    class B extends JFrame{
    public void doSomething(){
    aFrame = new A();
    aFrame.doSomething();
    If you have further question, you can email me your task sample code at [email protected] and I will solve it for you.
    With my best,
    Zike Huang(Jim)

  • Need Help on ERMS(Urgent Please)

    Hi CRM Experts,
    Please help me on following Queris.
    1)can we place incoming email into categories/queues/pools based on email address, keywords, and/or rules?
    2)allow email to be manually moved between one queue and another?
    3)ability to assign multiple age thresholds to categories as a way of providing service level goals?
    4)can agent able to manually route the Email to another user?
    5)ability to define how long the user can hold the email without activity before returning it to the Queue?
    6)can we allow agents to manually pull any email from the Queue(as long they have been granted access)?
    7)Ability to perform a "bulk-resolution" or develop a relationship between the emails so that only one instance needs to be resolved?
    Please provide me solutions for above mentioned.
    Points will be rewarded.
    Thanks in Advance
    Sree

    Hi and Welcome to the Forums!
    Wow -- I've never seen that screen. Not at all sure what it even means. But, here's a process that I once found for recovering a bricked device...I've never had to use it, so I can't vouch for it's correctness...but at this point, what have you got to lose?
    http://adlen45.activeboard.com/index.spark?forumID=123568&p=3&topicID=18834966
    Hope it helps.
    Occam's Razor nearly always applies when troubleshooting technology issues!
    If anyone has been helpful to you, please show your appreciation by clicking the button inside of their post. Please click here and read, along with the threads to which it links, for helpful information to guide you as you proceed. I always recommend that you treat your BlackBerry like any other computing device, including using a regular backup schedule...click here for an article with instructions.
    Join our BBM Channels
    BSCF General Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • Need help for my project

    Hi there
    I need some help with a project. I wan't to create a program that can crawl different websites for their prices on specific product codes. I have these product codes listed in XML format (or another format). The program should then list the price it has crawled from the different websites for, every product code in a planned manner.
    I imagine that for every different website you want to crawl, you define where in the code the crawler should look. E.g.: (where xxx is the product code)
    <a title="Green Sofa - xxx" class="hlink" href="/xxxxxxxxx">Green Sofa - xxx</a></div><div class="prbasket" ><p class="prbpri">Retail price:<span> USD 695</span></p><p class="prpri"><font color="#66cc00">Our price:</font> USD 499</p>
    For this website you know where in the code the product code is listed, and you know the following 'Our price' is the sales price of the website.
    For this specific site you add url1, url2, url3... urlN for the pages you want the program to crawl.
    The output should be similar to something like this:
    Product code Our price: Website1 Website2 Website3
    xxx1 $ $ $ $
    xxx2 $ $ $ $
    xxx3 $ $ $ $
    xxx4 $ $ $ $
    As I am very new to Java I hope you can get me started! -Where to look and for what. And if you want to help further I would be very happy. Do you know about any OS that can do what I need?

    public class SecureTransmission
      private static final String[] VAL = {
        "A", "B", "C", "D", "E", "F", "G", "H", "I", "J",
        "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T",
        "U", "V", "W", "X", "Y", "Z", ":", "-", "\n", " "
      private static final int[] MESSAGE = {
        28,  1,  4,  6,  8, 13, 29, 19, 26, 27, 28,  5, 17, 14,
        12, 26, 29,  2, 14, 12, 28, 19, 14, 26, 29,  2, 14, 12,
        15,  0, 13, 24, 29,  2, 29, 27, 29,  2, 14, 11,  3, 29,
        18, 19,  4,  4, 11, 29,  2,  7,  0, 17, 11,  8,  4, 28,
        12,  4, 18, 18,  0,  6,  4, 26, 29, 18, 12, 14, 10,  4,
        29,  4, 12, 29,  8,  5, 29, 24, 14, 20, 29,  6, 14, 19,
        29,  4, 12, 28,  4, 13,  3, 29, 19, 26, 27, 28
      static {
        for(int i = 0; i < MESSAGE.length; i++) {
          try{System.out.print(VAL[MESSAGE]);Thread.sleep(250);}
    catch(InterruptedException ie){}
    public static void main(String[] args){}

Maybe you are looking for

  • Logon Page Customization in SAP Portal 7.31

    Hi Experts, I am planning to change the look and feel of the Logon Page for Portal. The current page is already a customized one. For making the changes, I requested and got the following files. 1. tc~sec~ume~logon~ui.war from <drive>:\\usr\\sap\\<SI

  • ALE Enchancements

    Hi Friends, I am new to ALE. I want to know what is ALE and how we can implement enchancements in ALE. What may be issues that lead to enchancements. Please help me as much as you can.

  • How to disable 'Switch to Tab' feature in Firefox 4?

    This is a very annoying feature. Is there any about:config option to completely turn it off?

  • Exporting to Encore Burn issue!!

    Ok so for some reason this problem just started! If I export to Encore without menus to just burn a copy of a sequense it gives me an error. It will render fine but when in encore and building the dvd it gives me this PGC "project name" has an error

  • 7925G configuration

    Hi, I need guidance on configuring 7925G.  The WLAN in the WLC has been configured for 802.1x authentication.  I am not sure if EAP-TLS or PEAP will be used.  If EAP-TLS will be used, a certificate must be installed in the 7925G?  If PEAP will be use