PCS Assignment 1(Kartick).pdf - Table of Contents 1 Question 1(Book Class \u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026 1.1 1.2 1.3 1.4 1.5 1.6 1.7

PCS Assignment 1(Kartick).pdf - Table of Contents 1...

This preview shows page 1 - 4 out of 30 pages.

Table of Contents 1)Question 1 (Book Class) …………………………………………1.1.Title………………………………………………………1.2.Requirements/Specification……………………………... 1.3.User Guide………………………………………………. 1.4.Structure…………………………………………………. 1.5.Pseudocode………………………………………………1.6.UML Diagram……………………………………………1.7.Limitations………………………………………………. 1.8.Testing ....…………………………………………………1.9.Java Documentation …………………………………….2)Question 2(HangMan Game) ……………………………………………2.1. Title………………………………………………………………2.2Requirements/Specification…………………………………………2.3 User Guide………………………………………………………... 2.3Structure……………………………………………………………. 2.4Pseudocode…………………………………………………………. 2.5UML Diagram………………………………………………………2.6Limitations………………………………………………………….2.7Testing ....……………………………………………………………2.8Java Documentation ………………………………………………
Background image
Electronic Assignment Submission and Marking Working Party - Final Report to Academic Council 17 May 2006 Page 2 Question 1) Title: Title: Book Ratings Author: Sai Karthik Date: 13thOctober 2019 File names: BookRatings.java, TestClass.java The program allows the user to create two book classes which has objects such as the Title of the book, Author, Year of Publications and takes in the user ratings and categorise them on range of 1 to 5 and display the average user rating. Requirements/Specification: The program Book Ratings has two classes one is the helper class that has methods such as GetCount(), GetTitle(), GetAuthor(), YearOfPublication(), ratings() ,addRatings() ,RatingsAssign(), sumRating(), Display(). Firstof all the programs takes the count value as a input parameter from the main method. The count is the value that denote number of books to be rated. The program then sets the count value. The programs now takes the input values such as Title as the parameter for GetTitle(), Author name as the parameter for GetAuthor(), Year of Publications as the parameter for YearOf Publications() and sets all the values using a setter method.Then according to the requirements specified the user prompts for five inputs ratings by using ratings() Method. Ratings () method is the validating method that validates whether the input entered by the user is in between 1 and 5. Once the validation is done the method addRatings() increment the No of users by one. The method ratingsAssign() then assigns the ratings entered by the user on the scale of 1 to five. This method also increse the no of users entering the scale value by 1. If the no of ratings becomes 5 then program display average of all the ratings entered by the user and number of users entered the rating as 1, 2, 3, 4, 5. Later if the user wants to create another book the value of the count will be incremented by one and the programs iterates again. Conditions: -The rating must be Integer value. -The value must be between 1 and 5 only. -The user must able to enter the rating till number of ratings is less than 5 The sample output of the program is Book 1 Review:
Background image
Electronic Assignment Submission and Marking Working Party - Final Report to Academic Council 17 May 2006 Page 3 Title: Author: Year of Publication: No of users rated as 1: No of users rated as 2:
Background image
Image of page 4

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture