Mini assignment : Toy Collection

Assignment 1

Create a class ToyCollection that stores information about different toys in a toy shop. The information to be stored about a single toy is,

- Toy identification as String

- Name of the toy as String

- Short description about the toy as a String

- Price of the toy as float

- Quantity of the toy in hand as short integer.

This class contains following methods,

- Constructor method that assigns user input values to above mentioned variables.

- main ( ) method that creates array of 4 objects of ToyCollection class and that takes input for all above details from the user and calls method to check validity of Quantity and Price values. If all values are valid then create the objects and display the details for all 4 toys.

- Method that checks validity of quantity and price. If the quantity is 0 or negative then method should throw user defined

exception with appropriate message and come out of program. Similarly if the price is 0 or negative then it should throw user defined exception with appropriate message and come out of program.

- Method that displays all details about a single toy in the following format, e.g. Here Total price should be calculated.

Toy Identification : S-1

Toy Name : Small Scooter

Toy Description : Ordinary 3 wheeler scooter

Toy price : 650.50

Quantity in hand : 3

Total price of Toys : 1951.50

Assignment 2

A Scroll Banner is an applet which displays 2 scrolling messages across the applet’s Window. Since the scrolling of a message is a repetitive task, it is performed by a Separate thread, created by the applet when it is initialized. Here background color used for the applet is yellow and foreground color used for displaying the messages is red. The upper message is displayed at position x = 100 and y = 200. This message is scrolled from right to left. The lower message is displayed at position x = 100 and y = 50. This message is scrolled from left to right. The Browser displays the applet till new page comes into view. At this time the Applet stops itself.

For logistic reasons : I need bidders from INDIA only

Beceriler: Java

Daha fazlasını görün: class assignment toy shop, yellow objects, message scroll, java in india, india program, india java, check applet, applet check, check new messages, Window Display, toys 4, toy, till, thread, small java task -- 2, SCOOTER, repetitive, red-x, page objects, ordinary, name red, java thread, input method, foreground, float

İşveren Hakkında:
( 0 değerlendirme ) Ooty, India

Proje NO: #76224