Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Java Expert


Home >> Java

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

Java, Programming

  • Category:- Java
  • Reference No.:- M9862056
  • Price:- $70

Priced at Now at $70, Verified Solution

Have any Question?


Related Questions in Java

Part a specification - robot simulationpart a

PART A Specification - Robot Simulation PART A Requirements To complete this assignment you will use the supplied eclipse project Robot P1/. It is already set up to execute a simple arm movement loop which you will build ...

Assessment instructionsin this assessment you will design

Assessment Instructions In this assessment, you will design and code a simple Java application that defines a class, instantiate the class into a number of objects, and prints out the attributes of these objects in a spe ...

Overviewyou are required to use java se 80 and javafx to

Overview You are required to use Java SE 8.0 and JavaFX to develop a Graphical User Interface (GUI) for the FlexiRent rental property management program created in Assignment 1. This assignment is designed to help you: 1 ...

Can someone kindly help me to consider whether java

Can someone kindly help me to consider whether Java provides the facility of operator overloading? If it does, may you kindly describe how overloading operators can be accomplished? If not, may you kindly describe why yo ...

Assignment game prototypeoverviewfor this assessment task

Assignment: Game Prototype Overview For this assessment task you are expected to construct a prototype level/area as a "proof of concept" for the game that you have designed in Assignment 1. The prototype should function ...

Chatbotscreate a small networked chat application that is

Chatbots Create a small, networked chat application that is populated by bots. Introduction On an old server park, filled with applications from the early days of the internet, a few servers still run one of the earliest ...

Assessment socket programmingtaskwrite a java gui program

Assessment: Socket Programming Task Write a JAVA GUI program that would facilitate text chatting/exchanging between two or multiple computers over the network/internet, using the concept of JAVA socket programming. If yo ...

Assignment taskwrite a java console application that allows

Assignment task Write a java console application that allows the user to read, validate, store, display, sort and search data such as flight departure city (String), flight number (integer), flight distance (integer), fl ...

Assessment instructionsin this assessment you will complete

Assessment Instructions In this assessment, you will complete the programming of two Java class methods in a console application that registers students for courses in a term of study. The application is written using th ...

Assessment -java program using array of Assessment -JAVA Program using array of objects

Assessment -JAVA Program using array of objects Objectives This assessment item relates to the course learning outcomes as stated in the Unit Profile. Details For this assignment, you are required to develop a Windowed G ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As