Vajad kellegagi rääkida?
Küsi julgelt abi LasteAbi
Logi sisse

Java Programming Exercise (0)

1 Hindamata
Punktid

Java Programming Exercise

Objective

Assess OO analysis and design skill and java programming skill.

The problem – Video rental store

For a video rental store we want to create a system for managing the rental administration. We want three primary functions .

Price

The price of rentals is based type of film rented and how many days the film is rented for. The customers say when renting for how many days they want to rent for and pay up front . If the film is returned late , then rent for the extra days is charged when returning.
The store has three types of films.
  • New releases – Price is PREMIUM_PRICE times number of days rented.
  • Regular films – Price is BASIC_PRICE for the fist 3 days and then BASIC_PRICE times the number of days over 3
  • Old film - Price is BASIC_PRICE for the fist 5 days and then BASIC_PRICE times the number of days over 5

PREMIUM_PRICE is 4 EUR
BASIC_PRICE is 3 EUR
Write a program that calculates the price of rentals and have output similar to this:
Matrix 11(New release ) 1 days 4 EUR
Spider man(Regular rental) 5 days 9 EUR
Spider man 2(Regular rental) 2 days 3 EUR
Out of africa(Old film) 7 days 9 EUR
Total price : 25 EUR
When returning films late
Matrix 11(New release) 2 extra days 8 EUR
Spider man(Regular rental) 1 days 3 EUR
Total late charge : 11 EUR

Bonus points

Customers get bonus points when renting films. A new release gives 2 points and other films give one point per rental. (Regardless of the time rented)
The system keeps track of how many bonus points the customers have and then the customers can use their bonus points to pay for a “new relase” rentals. 25 points pays the rental for one day. When paying with bonus point the rental receipt could look like this.
Matrix 11 (New release) 1 days ( Paid with 25 Bonus points)
Total price : 0 EUR
Remaining Bonus points: 3

Inventory

The inventory keeps track of all the films in the store. We need to be able to:
  • Add a film
  • Remove a film
  • Change the type of a film
  • List all films
  • List all films in store (e.g. not rented at the moment)

The implementation

  • Create a main method that demonstrates the various functions. (Do not write a UI)
  • No persistence is required .

What we will look at

  • The OO design of the solution
  • That the code is neat.
  • That the code is self documenting. (Use comments when applicable but self documenting naming is equally important )

Java Programming Exercise #1 Java Programming Exercise #2
Punktid 50 punkti Autor soovib selle materjali allalaadimise eest saada 50 punkti.
Leheküljed ~ 2 lehte Lehekülgede arv dokumendis
Aeg2015-02-26 Kuupäev, millal dokument üles laeti
Allalaadimisi 13 laadimist Kokku alla laetud
Kommentaarid 0 arvamust Teiste kasutajate poolt lisatud kommentaarid
Autor qqwerty123 Õppematerjali autor

Sarnased õppematerjalid

Introduction of SCM
40
doc

Introduction of SCM

INTRODUCTION OF SUPPLY CHAIN MANAGEMENT (SCM) A supply chain is a network of facilities and distribution options that performs the functions of procurement of materials, transformation of these materials into intermediate and finished products, and the distribution of these finished products to customers. Supply chains exist in both service and manufacturing organizations, although the complexity of the chain may vary greatly from industry to industry and firm to firm. Supply chain management is typically viewed to lie between fully vertically integrated firms, where the entire material flow is owned by a single firm and those where each channel member operates independently. Therefore coordination between the various players in the chain is key in its effective management. Cooper and Ellram [1993] compare supply chain management to a well-balanced and well-practiced relay team. Such a team is more competitive when each player knows how to

Kategoriseerimata
Thesis Kivimaa August 2022
140
pdf

Thesis Kivimaa August 2022

..................................................... 122 Installation of the GSES .......................................................................................................... 122 Start GSES ............................................................................................................................... 122 Results for managers .............................................................................................................. 124 Program Structure .................................................................................................................. 128 Input of collected expert information to GSRM/GSES ........................................................... 129 Security Class .......................................................................................................................... 129 MeasureGroups ...............................................................................

Infotehnoloogia
Referaat - Jackass
8
docx

Referaat - Jackass

show, though the offer was turned down. A bidding war eventually occurred between Comedy Central and MTV, which MTV eventually won. It was then that Jackass was born. Controversy Since the first episode, Jackass frequently featured warnings and disclaimers noting that the stunts performed were dangerous and should not be imitated, and that recordings of any stunts would not be aired on MTV. Such warnings not only appeared before and after each program and after each commercial break, but also in a "crawl" that ran along the bottom of the screen during some especially risky stunts, as well as showing their 'skull and crutches logo' at the bottom right of the screen to symbolize the stunt performed as risky. Nevertheless, the program has been blamed for a number of deaths and injuries involving teens and children recreating the stunts. On January 29, 2001, U.S. Senator Joseph Lieberman publicly condemned MTV

Inglise keel
Business peciliarities in Ukraine and Bealrus
106
pdf

Business peciliarities in Ukraine and Bealrus

Paying back its debt--barring a further accelerated depletion of foreign exchange reserves--would be close to impossible without fresh foreign finance, preferably in the form of disbursements from the IMF. A two-year IMF stand-by arrangement, put in place in 2008, provided exceptional access to financing that was crucial in helping Ukraine through the Great Recession. In particular, it helped to prevent a banking crisis. In many respects, however, Ukraine reneged on its commitments, and the program went off-track very soon, as a 2011 IMF evaluation concludes. This holds for fiscal, exchange rate, and monetary policies, but in particular for the energy sector. In 2008, Ukraine committed itself to phasing out all gas subsidies in three years, but little was done on that front. For some specific industries, gas prices were actually decreased in 2009. Ukrainian households still pay traditionally extremely little for the gas their everyday life depends on

Inglise keel
Tarkvara kokkuvõte inglise keeles
36
doc

Tarkvara kokkuvõte inglise keeles

1. OBJECT-ORIENTED PARADIGM The Model •The model defines an abstract view to the problem. This implies that the model focuses only on problem related stuff and that you try to define properties of the problem. These properties include: 1 •the data which are affected and 2 •the operations which are identified by the problem. Object-oriented Paradigm •Everything is an object •A program is a bunch of objects telling each other what to do by sending messages •Each object has its own memory made up of other objects •Every object has a type •All objects of a particular type can receive the same messages Domain Model •A domain model does not represent the entire domain as it is in the real world. It includes only the concepts that are needed to support the application. Object •Is a partitioned area of memory where object code is stored •The area of memory is protected

Tehnoloogia
Cialdini raamat
548
pdf

Cialdini raamat

We all employ them and fall victim to them to some degree in our daily interactions with neighbors, friends, lovers, and family. But the compliance practitioners have much more than the vague and amateurish understanding of what works than the rest of us have. As I thought about it, I knew that they represented the richest vein of informa- tion about compliance available to me. For nearly three years, then, I combined my experimental studies with a decidedly more entertaining program: I system- atically immersed myself in the world of compliance professionals-salespeople, fund-raisers, advertisers, and others. _. _ INTRODUCTION My purpose was to observe, from the inside, the techniques and strategies most commonly and effectively used by a broad range of compliance practitioners.

Psühholoogia
Steve Krug-Dont Make Me Think 2014
215
docx

Steve Krug-Dont Make Me Think 2014

Don’t Make Me Think, Revisited A Common Sense Approach to Web Usability Steve Krug Don’t Make Me Think, Revisited A Common Sense Approach to Web Usability Copyright © 2014 Steve Krug New Riderswww.newriders.com To report errors, please send a note [email protected] New Riders is an imprint of Peachpit, a division of Pearson Education. Editor: Elisabeth Bayle Project Editor: Nancy Davis Production Editor: Lisa Brazieal Copy Editor: Barbara Flanagan Interior Design and Composition: Romney Lange Illustrations by Mark Matcho and Mimi Heft Farnham fonts provided by The Font Bureau, Inc. (www.fontbureau.com) Notice of Rights All rights reserved. No part of this book may be reproduced or transmitted in any form by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior written permission of the publisher. For information on getting permission for reprints and excerpts, [email protected]. Notice of Liability Th

Kategoriseerimata
The 4-Hour Body - An Uncommon Guide to Rapid Fat-Loss-Incredible Sex-and Becoming Superhuman - Timothy Ferriss
574
pdf

The 4-Hour Body - An Uncommon Guide to Rapid Fat-Loss, Incredible Sex, and Becoming Superhuman - Timothy Ferriss

PRAISE FOR The 4-Hour Workweek "This is a whole new ball game. Highly recommended." --Dr. Stewart D. Friedman, adviser to Jack Welch and former director of the Work/Life Integration Program at the Wharton School, University of Pennsylvania "It's about time this book was written. It is a long-overdue manifesto for the mobile lifestyle, and Tim Ferriss is the ideal ambassador. This will be huge." --Jack Can eld, cocreator of Chicken Soup for the Soul®, 100+ million copies sold "Stunning and amazing. From mini-retirements to outsourcing your life, it's all here. Whether you're a wage slave or a Fortune 500 CEO, this book will change your life!" --Phil Town, New

Inglise keel




Kommentaarid (0)

Kommentaarid sellele materjalile puuduvad. Ole esimene ja kommenteeri



Sellel veebilehel kasutatakse küpsiseid. Kasutamist jätkates nõustute küpsiste ja veebilehe üldtingimustega Nõustun