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 palindrome is a number

A palindrome is a number or text phrase that reads the same backward as forward. For example, each of the following five-digit integers is a palindrome: 12321, 55555, 34543 and 11611. Write a program that reads in a five-digit integer and determines ..

  Properly store the number from variable value

1. Statement will properly store the number from variable  value  into the output file object AnsFile?

  Write a program to read a data file and extract parameters

Write a C/C++ program to read a data file and extract parameters. The program must obtain the filename via a command-line argument.

  Write a c program that asks for and reads in two integers

Write a C program that asks for and reads in two integers and then reports if one is a multiple of the other.

  Programs written with inheritance

Many programs written with inheritance could be written with composition instead, and vice versa. Rewrite the classes Point3D, Sphere and Cylinder using composition rather than inheritance

  Object-oriented systems is the concept of object

At the heart of all object-oriented systems is the concept of an object. Simply stated, an object is a set of related characteristics and their associated actions.

  Implement the guess the word

Implement  the ‘Guess the Word' game in an object-oriented manner

  Time conversion

Write a C++ program that takes an Eastern standard time in hours, minutes, and seconds,and prints it out in Central time, Mountain time, or Pacific time.

  Program to enter number of values to be processed

Write c++ statements to permit the user to enter n, the number of values to be processed; then assign the anonymous array of n double values, storing its address in doublPtr.

  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.

  C assignment of curl library

C Assignment Curl library must be used To be done on linux, it should be compiled using the following command: gcc -Wall -ansi -pedantic NameOfFile.c -lncurses Please make sure it is commented with clarification Variable names in camel case

  Write a program that accepts as input, without prompts

Write a program that accepts as input, without prompts, a series of short values, terminated by end of file. The program outputs one line:

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