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

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

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

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

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