Algorithm analysis with advanced data structures

Assignment Help JAVA Programming
Reference no: EM13282718

Algorithm Analysis with Advanced Data Structures, 

Your good friend, a Rock Star, asked you to create a Time Manager app for him

The Rock Star performs gigs at certain dates, all around the country - at most one gig per day

His memory is poor, though – he often forgets if (and where) he is supposed to play on a certain date

After confirming he has a gig at a certain night, the Rock Star often wants to know when and where the next performance will be 

Write a program cmsc401.java that

receives a sequence of commands (from 1 up to 10000 commands)

a command can be one of: 

1 - an insert – add the date and city to “gig plan”

2 - a ‘date’ query – check if there’s a gig planned at a certain 

date (and if yes, which city)

3 - a ‘next gig’ query – for the gig found using most recent 

“command 2”, check when and where the next performance is

4 – end of sequence of commands, quit the program the sequence of commands always ends with Command 4

Command 3 always is preceded immediately by Command 2

Command 3 is given only if Command 2 returned data & city (that is, there was a gig planed at a queried date)

the sequence of commands is presented at standard input,

each line is a new command

format of the commands and responses to them:

1 - insert a gig, 

input format is “1 YYYYMMDD STRING”, no output

YYYYMMDD represents the date – date can by anything in the 21st century

STRING represents the city and is up to 10 characters in length

2 – a ‘date’ query, 

input format is “2 YYYYMMDD”, 

output format is “YYYYMMDD STRING” if there is a gig on that date, or 

“YYYYMMDD NO GIG” if not3 – a ‘next gig’ query

input format is “3”

output format is data and place of next gig: “YYYYMMDD STRING”, 

or “NO NEXT GIG” if there’s no next gig in database

4 – quit

input format is “4”, no output, program exits

Use Standard I/O to read input and write the result

In Java, it’s System.in for input, System.out for output

Reference no: EM13282718

Questions Cloud

How is the external environment analyzed : How is the external environment analyzed? External environmental analysis is the process of identifying and monitoring the environment in which a client exists and the opportunities and threats that are present.
Explain what mass (g) of nf3 can be produced : N2(g)+3F2(g)-->2NF3(g). If 1.7 g of nitrogen and an excess of fluorine is used in the reaction, what mass (g) of NF3 can be produced
How much thermal energy is created : A 1200 crate slides 15 down a ramp that makes an angle of 30 with the horizontal. how much thermal energy is created
Determine the fundamental period and time of signal : For each of the following signals, determine whether it isperiodic; if it is, determine its fundamental (i.e., smallest) period T0 and fundamental frequency f0. (a) x(t) =sin2(2t) (b) x(t) =cos(√3t) +sin(2t)
Algorithm analysis with advanced data structures : Algorithm Analysis with Advanced Data Structures, Your good friend, a Rock Star, asked you to create a Time Manager app for him, The Rock Star performs gigs at certain dates, all around the country - at most one gig per day
Explain how many moles of sodium ions are contained : How many moles of sodium ions are contained in a 100.4 g sample of sodium sulfate, Na2SO4? Round to one decimal place.
What is the change in thermal energy of the seat of her pant : A 22 child slides down a 2.4 -high playground slide. She starts from rest, and her speed at the bottom is 1.9 What is the change in thermal energy of the seat of her pants
For what fraction of acycle does each diode conduct : A half-wave rectifier circuit with a 1-Kwload operates from a 12-v(rms) 60-Hz household a 5-to 1 transformer having a center-tappedsecondary winding. It use two silicon diodes that can be modeled tohave a 0.7-v drop for all currents.
Explain the absorption of the standard solution : This results in the formation of the highly colored FeSCN2+ complex ion. To do this analysis, a standard solution containing 5.00x10^-5 M Fe3+ was prepared. After addition of excess SCN-, the absorption of the standard solution =0.363 at 580 nm.

Reviews

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

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