How a base version of this assignment works

Assignment Help C/C++ Programming
Reference no: EM13161500

For this assignment you are to create an interactive moving sign in the context of a cityscape street scene. Click the link below to see how a base version of this assignment works. Type a message in the long blank slot at the top left, and then click Start to see the message displayed in a moving format.

The driver and DisplayWindow classes, which you may NOT alter, are provided here:

import javax.swing.*;

/* Menu machinery provided, but you are free
 * to ignore it if your solution does not involve menus
 */
public class SignDriver {

        public static void main(String[] args) {
                DisplayWindow d = new DisplayWindow();
                JMenuBar menuBar = new JMenuBar(); // make menu bar
                d.setJMenuBar(menuBar); // add menu bar to window d
                MovingSignPanel p = new MovingSignPanel(menuBar);
                d.addPanel(p);
                d.showFrame();
        }
}

--------------------------

package owl.common;

import javax.swing.*;
import java.awt.*;

/**
 * A class that puts a graphics window on your display
 */
public class DisplayWindow extends JFrame {
        /**
         * Content pane that will hold the added Jpanel
         */
        private Container c;

        /**
         * DisplayWindow constructor - no parameters
         */
        public DisplayWindow() {
                super("Display");
                c = this.getContentPane();
        }

        /**
         * Adds panel to content pane
         * 
         * @parameter the panel to be added
         */
        public void addPanel(JPanel p) {
                c.add(p);
        }

        /**
         * consolidates the frame, makes it visible, causes program termination when
         * window is closed manually
         */
        public void showFrame() {
                this.pack();
                this.setVisible(true);
                this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        }
}

-------

Note that the application will makes use of the DisplayWindow class that figures prominently in Chapters 12 and 13 of the textbook. For this assignment you need only submit a single file, MovingSignPanel.java (must be so named), which extends JPanel in the standard way, and which carries out the main actions of the assignment.

Other issues

* The cityscape presented above in the running demonstration code is pathetic - there's just one building, no sky to speak of, etc. You are encouraged to vastly improve on the rendering of the cityscape. Ideas: more buildings; the sky can become lighter or darker over time; lights can go on in some of the windows in the buildings; you could add a park, a flagpole, the sun, the moon, cars, flying saucers; you can make the sign move faster or slower, and so forth.

* The SignDriver code includes machinery for including a menu or menus in your application. You DO NOT need to use this machinery. But if you decide to add menus, it's there.

 

 

Reference no: EM13161500

Questions Cloud

State when mixed hcl an acid and naoh a base will react : When mixed HCl an acid and NaOH a base will react with each other. a) Write the balanced neutrali zation equation for this reaction
Who finally settled the spontaneous debate : What does abiogenesis refer to and who finally settled the spontaneous debate?
Why are pig hearts used in most heart transplants : Why are pig's hearts used in most heart transplants involving human recipients? Name the complications observed in using pig's heart for transplant.
State what is the ph of pure water in equilibrium : What is the pH of pure water in equilibrium with 1 atmosphere of carbon dioxide at 25?C?
How a base version of this assignment works : For this assignment you are to create an interactive moving sign in the context of a cityscape street scene. Click the link below to see how a base version of this assignment works. Type a message in the long blank slot at the top left, and then clic..
Why would chrysler have instituted this production change : Explain why Chrysler's decision might have been prompted by movements in its wage costs or capital costs, or both. Why would Chrysler have instituted this production change for its most popular
State solubility of calcite will increase with a decrease : Solubility of calcite (CaCO3) will increase with a decrease in temperature and decrease with an increase in temperature. This is because the solubility of calcite is dependent on the solubility of CO2.
Why might the market exchange rate change a lot : Why might the market exchange rate change a lot as this monetary tightening is announced and implemented and what is the path of market exchange rate likely to be over the next several years?
Manufacturer of car batteries : A manufacturer of car batteries claims that his batteries will last, on average, 3 years with a variance of 1 year. If 5 of these batteries have lifetimes of 1.9, 2.4, 3.0, 3.5, and 4.2 years

Reviews

Write a Review

C/C++ Programming Questions & Answers

  A constructor and a destructor

A constructor and a destructor, Insert a new element chosen by the user at the correct place in the list

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  C programme to find the minimum and maximum value

write a c programme to find the minimum and maximum value each elements in each row ,to create table b,having 5 rows and 2 coloums,the first coloum of table b is the maximumvalue and thye second coloum is the maximum value in each row.

  A c++ program using the concept of function overloading

write a c++ program using the concept of function overloading for the following options : select the options from [1-3], 1- Area of rectangle 2- Area of square 3- Exit ,

  Prepare a businesspartner

Prepare a BusinessPartner class that contains a company name, first name and a telephone number.

  rewrite that statement in a more readable style.

Give an example statement in C, C++, or Java that is particularly unreadable. Rewrite that statement in a more readable style.

  To reverse the order of elements on a stack

Write a program in C++ to  reverse the order of elements on a stack S using two additional stacks using one additional stack

  Draws a pyramid consisting of bricks

Write a C program that draws a pyramid consisting of bricks arranged in horizontal rows, so that the number of bricks in each row decreases by one as you move up the pyramid.

  Describe the probability of the moves

Write a program in C++ to describe the Probability of the moves

  Write a program that computes the cost of long distance call

Write a program that computes the cost of a long distance call. The cost of the call is determined according to the following rate schedules.

  Create a base employee class

Create a base Employee class and a derived StudentEmployee class

  Draws a single level for a "rogue­like" computer game

You will write a program that draws a single level for a "Rogue­like" computer game. The program will parse a line of input text from an input file (room.txt), use the parsed text to determine the shape of the room and its contents and then draw the ..

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd