This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Item { | |
private String productName; | |
private int quantity; | |
private double unitPrice; | |
Item(String productName, int quantity, double unitPrice) { | |
this.productName = productName; | |
this.quantity = quantity; | |
this.unitPrice = unitPrice; | |
} | |
public String toString() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Write a description of class Card here. | |
* @author (Yaswanth) | |
* @version (11-08-2015) | |
*/ | |
public class Card { | |
/** | |
* titleOfBook in card catalog. | |
*/ | |
private String titleOfBook; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
class Question { | |
private int serialNumber; | |
private String questionText; | |
private String choices; | |
private int correctAnswer; | |
private static int points; | |
Question(int serialNumber, String questionText, String choices, int correctAnswer, int points) { | |
this.serialNumber = serialNumber; | |
this.questionText = questionText; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Write a description of class Bookshelf here. | |
* | |
* @author (your name) | |
* @version (a version accountNumber or a date) | |
*/ | |
public class Account | |
{ | |
private String name; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Write a description of class Bookshelf here. | |
* | |
* @author (Yaswanth) | |
* @version (09-08-2015) | |
*/ | |
public class Bookshelf | |
{ | |
private String bookName; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Write a description of class StringTokenizer here. | |
* | |
* @author (Yaswanth) | |
* @version (08-08-2015) | |
*/ | |
import java.util.*; | |
public class Stokens | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.ArrayList; | |
import java.util.ListIterator; | |
class BookYourShow { | |
private ArrayList<Show> show; | |
private String userName; | |
private String userMobileNumber; | |
private String movieName; | |
private String movieShowDate; | |
private String movieShowTime; | |
private int numberOfSeats; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Employee extends Person { | |
String designation; | |
int salary; | |
Employee(Person p,String designation, int salary) { | |
super(p.firstName, p.lastName, p.gender, p.age); | |
this.designation = designation; | |
this.salary = salary; | |
} | |
public String toString() { | |
String s = super.toString() + this.designation; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.List; | |
import java.util.ArrayList; | |
import java.util.ListIterator; | |
import java.util.Collections; | |
import java.util.TreeSet; | |
class SortGrade { | |
List<Student> stuList; | |
SortGrade(List<Student> stuList) { | |
this.stuList = stuList; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.List; | |
import java.util.ArrayList; | |
import java.io.BufferedReader; | |
import java.io.FileReader; | |
import java.util.StringTokenizer; | |
import java.util.Collections; | |
class DocumentOrdering { | |
List<String> fileNames; | |
List<String> fileContents; |
OlderNewer