Question

In: Computer Science

write a java program of mickey mouse it can be simple with just ears face eyes...

write a java program of mickey mouse it can be simple with just ears face eyes and mouth

Solutions

Expert Solution

Source Code:

public class Applet extends GP.Containers.Applet
{
    public Applet ()
    {
        // create Mickey parts
        GP.Shapes.Oval face = new GP.Shapes.Oval();
        GP.Shapes.Oval leftEar = new GP.Shapes.Oval();
        GP.Shapes.Oval rightEar = new GP.Shapes.Oval();

        // set position of Mickey parts
        GP.Attributes.Coordinate center = new GP.Attributes.Coordinate(200, 200);
        face.SetPosition(center);
        center = new GP.Attributes.Coordinate(90, 90);
        leftEar.SetPosition(center);
        center = new GP.Attributes.Coordinate(310, 90);
        rightEar.SetPosition(center);

        // ears should be same size, face larger
        GP.Attributes.Dimension size = new GP.Attributes.Dimension(200, 200);
        face.SetSize(size);
        size = new GP.Attributes.Dimension(120, 120);
        leftEar.SetSize(size);
        rightEar.SetSize(size);

        // all parts are the same color
        GP.Attributes.Color color = new GP.Attributes.Colors.Black();
        face.SetColor(color);
        leftEar.SetColor(color);
        rightEar.SetColor(color);
    }
}

Note: If you have any doubts or queries, feel free to ask by commenting down below.

And if my answer suffice to the requirements, then kindly upvote as an appreciation

Happy Learning :)


Related Solutions

I want to write this program in java. Write a simple airline ticket reservation program in...
I want to write this program in java. Write a simple airline ticket reservation program in java.The program should display a menu with the following options: reserve a ticket, cancel a reservation, check whether a ticket is reserved for a particular person, and display the passengers. The information is maintained on an alphabetized linked list of names. In a simpler version of the program, assume that tickets are reserved for only one flight. In a fuller version, place no limit...
Write a simple java program that produces any text art ("ASCII art") picture. Your program can...
Write a simple java program that produces any text art ("ASCII art") picture. Your program can produce any picture you like, with the following restrictions: • The picture should consist of between 3 and 200 lines of output, with no more than 100 characters per line. • The code must use at least one for loop or static method but should not contain infinite loops.
in a gui ' in java write a program that draws equal a simple fence with...
in a gui ' in java write a program that draws equal a simple fence with vertical, spaced slats backed by two boards. Behind the fence show a simple house support Make sure the in the und. house is visible between the slats in the fence.
In this question, you are asked to write a simple java program to understand natural language....
In this question, you are asked to write a simple java program to understand natural language. The user will enter the input following the format: Name came to City, Country in Year. For example: Robin came to Montreal, Canada in 2009. Assume a perfect user will follow the exactly above formats for the inputs. Your program should be able to analyze the key words (Name, City, Country and Year) from the inputs and reorganize the outputs following format: Name stay...
I need a java code Write a simple program to prompt the user for a number...
I need a java code Write a simple program to prompt the user for a number between 1 and 12 (inclusive) and print out the corresponding month. For example:   The 12th month is December. Use a java "switch" statement to convert from the number (1-12) to the month. Also use a "do while" loop and conditional checking to validate that the number entered is between 1 and 12 inclusive and if not, prompt the user again until getting the correct...
Watch: Mickey Mouse Monopoly After watching the video, you should write one long paragraph summarizes the...
Watch: Mickey Mouse Monopoly After watching the video, you should write one long paragraph summarizes the video and one long paragraph of commentary discussing the video. Your entry should follow this format: Name of Video: Summary: Commentary:
Write a simple java program to list roman numeral for a given range of numbers. Roman...
Write a simple java program to list roman numeral for a given range of numbers. Roman numerals are represented by seven different symbols: I, V, X, L, C, D, and M. I = 1, V = 5, X = 10, L = 50, C = 100, D = 500, M = 1000 Roman numerals are usually written largest to smallest from left to right. But a number like 4 is not written as IIII. It is written as IV. Because...
Write a java simple document retrieval program that first asks the user to enter a single...
Write a java simple document retrieval program that first asks the user to enter a single term query, then goes through two docuements named doc1.txt and doc2.txt (provided with assignment7) to find which document is more relevant by calculating the frequency of the query term in each document. Output the conclusion to a file named asmnt7output.txt in the following format (as an example for query “java” and “problem”). The percentages in parenthese are respective supporting frequencies. java: doc1(6.37%) is more...
Write a simple JAVA program to understand natural language. The user will enter the input following...
Write a simple JAVA program to understand natural language. The user will enter the input following the format: Name came to City, Country in Year. For example: Chris came to Bangkok, Thailand in 2009. The user will follow the exactly the same formats for the inputs. Your program should be able to analyze the key words (Name, City, Country and Year) from the inputs and reorganize the outputs following format: Name stay in City for X year(s). City is in...
In a Java program, how could I write a program that can assign values that would...
In a Java program, how could I write a program that can assign values that would make a rock paper scissors game work? I have a program that will generate a computer response of either rock, paper, or scissors but how can I compare a user input of "rock", "paper", or "scissors" so that we can declare either the user or the computer the winner.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT