Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~4K People Reached
Favorite Tags
c++ x 15
java x 14
Member Avatar for AlvinLiu

#include <string> #include <cstdlib> typedef enum {Dominion, Sobeys, Shoppers, Walmart} Store; using namespace std; class Item { private: // name of the item (non-empty string) string name; // number of dollars in price of item int dollars; // number of cents in price of item int cents; // store where …

Member Avatar for AlvinLiu
0
494
Member Avatar for AlvinLiu

what is code mean? [CODE] void fo(){ count += 1 + !(count <5); cout << count <<endl; } [/CODE] Thank you .

Member Avatar for MandrewP
0
180
Member Avatar for AlvinLiu

[CODE]#include "assign3.h" #include <iostream> using namespace std; Calculator::Calculator(int size) { if (size > 0) { mSize = size; mPstack = mPtop; if ((*mPstack).im && (*mPstack).re) { mSize = size; mPstack = mPtop; } else { mSize = 0; (*mPstack).re = 0; (*mPstack).im = 0; } } else { mSize = …

Member Avatar for AlvinLiu
0
180
Member Avatar for AlvinLiu

/** readGradeFile ******************************************************* * Read the data from inf into the parallel arrays given. * @params inf -- input file to read data from @pre inf is already open * id[] -- container for student id #s * asgts[] -- container for assignment grades * mt[] -- container for mid-term …

Member Avatar for VernonDozier
0
140
Member Avatar for AlvinLiu

[CODE]int[] list; int n, value; input n; list = new int[n]; for (int i = 0; i < n; i++) { input value; list[i] = value; } int m = 0; for (int i = 0; i < n; i++) { for (int j = i+1, j < n; j++) …

Member Avatar for gnanasemantic
0
118
Member Avatar for AlvinLiu

[CODE]import java.io.FileReader; import java.io.IOException; import java.util.Scanner; import java.util.Arrays; import java.util.NoSuchElementException; public class ReservationBook { private Reservation[] data; public Reservation[] readFile(String filename) throws IOException { FileReader reader = new FileReader(filename); try { Scanner in = new Scanner(reader); boolean done = false; while(!done) { try { int numberofR = in.nextInt(); data = …

Member Avatar for Taywin
0
156
Member Avatar for AlvinLiu

[CODE] public class Reservation { private String firstname; private String lastname; private String address; private String name; private int licenseN; private String date; private int daysN; private String type; public Reservation(String f,String l,String a,int lpn,String dt,int nd,String tp) { firstname = f; lastname = l; address = a; licenseN = …

Member Avatar for AlvinLiu
0
2K
Member Avatar for AlvinLiu

using recursive Java method [CODE]import java.util.ArrayList; public class Count { private String word; public Count(String w) { word = w; } public ArrayList<String> getUpper() { ArrayList<String> result = new ArrayList<String>(); if(word.length()==0) { result.add(word); return result; } for(int i=0;i< word.length();i++) { if(Character.isUpperCase(word.charAt(i))) { String shorter = word.substring(i); Count shorterCount = new …

Member Avatar for AlvinLiu
0
738