Recent content by codyscott

  1. C

    🔒 Closed Basic: java code refactoring - preview to oop

    You need multiple classes kung gusto ng OOP. 1) Cinema class 2) Movie class Attributes ng Cinema class - cinemaName - theatres Attributes ng Movie class - movieTitle - moviePrice - movieSchedules - movieRating
  2. C

    🔒 Closed Help naman pooo convert numbers to numerals 1 - 3000

    no worries, Shen Yue . Oks lang. Mas maraming lines of codes at ang mangyayari ay magiging PROCEDURAL ang kalalabasan ng program mo but it will be ok as a solution. You can get the idea from this example and adapt it. Bale...first evaluate....determine group....process. Ganon lang.
  3. C

    🔒 Closed Help naman pooo convert numbers to numerals 1 - 3000

    Heto, mabilisan ko lang ginawa but I think it's on the right track to the solution. Iniwan ko yung kalahati ng problema para sa iyo. import java.util.HashMap; import java.util.Map; public class MainApp { private String[] onesArray = {"I","II","III","IV","V","VI","VII","VIII","IX"}...
  4. C

    🔒 Closed Help naman pooo convert numbers to numerals 1 - 3000

    Kailangan mo ng mas structured na code kesa dyan. Here's the step by step: Step 1) User input an integer Step2) program check input if valid Step3) if valid, program check input if it belongs to ONES group, TENS group, HUNDRED or THOUSANDS group ....examples: 5 belongs to Ones group (...or 1...
  5. C

    🔒 Closed Basic: java code refactoring - preview to oop

    clue on how to delete a product from order list: - kung sa arraylist, ang paglagay ng product is .add(index number)....ang pag delete .remove(index number) - so sa order arraylist mo, use .remove and then provide the product's index number
  6. C

    🔒 Closed Basic: java code refactoring - preview to oop

    Yannnnn, excellent! Kuha mo na yung mindset. That's how you should see the "problem" na gusto mo i-solve. Step by step. In reality talaga, programming is 90% solving the problem in paper and pen.... and 10% coding. At saka, programming is an "art" also (lalo na sa naming ng methods/functions...
  7. C

    🔒 Closed Basic: java code refactoring - preview to oop

    yes, yan yon.... take note of the words "Step by Step" and "to solve a problem" na sinasabi niya. actually yung pinapagawa sa inyong system ay TOO ADVANCED para sa iyo kung nagsisimula ka pa lang na mag program. And in my personal opinion, this is one of the many signs na HINDI qualified ang...
  8. C

    🔒 Closed Basic: java code refactoring - preview to oop

    Paano ka magsaing? step 1) ihanda mo ang kaldero step 2) ihanda mo ang bigas step 3) ilagay mo ang bigas sa kaldero step 4) lagyan mo ng tubig ang kaldero na may bigas step 5) isalang ang kaldero sa rice cooker step 6) hintayin na maluto step 7) exit the program ...in programming, ganyan din...
  9. C

    🔒 Closed Basic: java code refactoring - preview to oop

    Moving a little bit ahead to Steps 4 and 5. Ganito ang sequence. 1) "Ale, isang Burger nga at saka isang Coke" 2) Question 1: Paano ita-type ni Ale yung order sa system (whole name or just number)? = System should ask: What is the product name: = System should ask also: Quantity...
  10. C

    🔒 Closed Basic: java code refactoring - preview to oop

    static void displayMenu() { System.out.println("WELCOME TO BURGER NG BAYAN"); System.out.println("****MENU FOR TODAY******"); for(Product p: mgaProduct) { System.out.println(p.getName() + " = $"+ p.getPrice()); //ito lang ang kailangan mo dito pang display...
  11. C

    🔒 Closed Basic: java code refactoring - preview to oop

    Carly_Rose Heto ang gamitin mo...mas malinis. Let's do it one method at a time. ***Code for the Main Application import java.util.ArrayList; import java.util.Scanner; public class MainApp { static ArrayList<Product> mgaProduct; static String[] listOfProduct = {"Burger_Price", "50"...
  12. C

    🔒 Closed Basic: java code refactoring - preview to oop

    Step 1 one is GOOD.. Step 2 is wrong....meron akong ginawang method.. pag-aralan mo. And also for price, use doable (not int) if you can. Step 3 is wrong....since na meron ng mgaProduct arraylist.... just loop inside that and use the GETTER methods of each product object. step 4 and 5....saka...
  13. C

    🔒 Closed Basic: java code refactoring - preview to oop

    ..OK... good start! Carly_Rose public class MainApplication { static ArrayList<Product> mgaProduct; //GOOD //kung ganito approach ang gagawin mo... static String listOfProduct [] = {"Burger_Price 50", "Coke_Price 50", "Fries_Price 40"}; //GAWIN MO SIYANG (para madaling mag...
  14. C

    🔒 Closed Basic: java code refactoring - preview to oop

    Carly_Rose parang ganito ang diagram
  15. C

    🔒 Closed Basic: java code refactoring - preview to oop

    Carly_Rose Kung medyo proper OOP ang magiging approach mo, yes, puwede kang gumawa ng "template" class for: 1) Product class - tapos meron attributes na "productName" at "productPrice".....tapos meron SETTERs and GETTERS. ...then as simple as 2 classes lang yung buong system mo...gawa ka ng...
Back
Top