FIT1051 Programming Fundamentals in Java

Hello, if you have any need, please feel free to consult us, this is my wechat: wx91due

FIT1051 ASSIGNMENT FOUR

Weight: 38% of your overall unit mark

Late Penalty: 5%-mark deduction per day

ASSIGNMENT 4 OVERVIEW:

In this assignment, you will build a text-based life simulation game where a university student attempts to survive a week of study, work, and social activities. The program will model real-world trade-offs such as energy, money, grades, and happiness.

At the end of the simulation, the program reports whether the player has “survived” as a thriving student, barely scraped through, or completely burned out.

The task requires you to apply object-oriented programming principles, particularly inheritance and polymorphism.

PROGRAM SETUP:

Imagine you’re stepping into the sneakers of a fresh uni-student trying to juggle classes, work shifts, late-night Netflix binges, and the occasional party invite. The week ahead looks busy, and every choice you make will affect your energy, grades, money, and happiness. Your mission? Survive all 7 days without crashing, burning out, or going broke.

At the start, the user enters their name and receives a shiny new student ID. Everyone begins with the same stats — balanced, but not perfect: Energy = 50, Money = 100, Grades = 50, Happiness = 50. Think of it as the starter pack for survival.

Each day, the student can take part in up to two activities. Some are serious — like attending a lecture or grinding through a work shift. Others are social and fun — like a night out with friends or a TikTok scroll that magically lasts three hours. Then there’s self-care: hitting the gym or meditating to get life back on track.

When the student chooses their daily activities, most outcomes are straightforward: study improves grades, work earns money, socialising lifts happiness, and relaxation restores balance. But every so often, life throws a curveball. A popped bicycle tire means you miss your work shift and still lose energy. A late-night study session might leave you sick the next day. A big party could end with a lost wallet or a brutal hangover. Even self-care isn’t safe — the gym might be closed, or a quick Netflix session could turn into a doomscroll that tanks your grades.

SIMULATION OVERVIEW:

The Gen-Z Life Simulator runs for 7 in-game days. Each day the program follows these steps:

1. Display Menu of Activities: A menu of possible actions is presented to the player.

2. Player Choice: The player may select up to two activities. However, if the player decides to skip the day, that choice becomes their only option for that day, and no additional activities can be taken.

3. Apply Effects: Each activity changes the player’s stats (Energy, Money, Grades, Happiness).

4. End-of-Day Report: A summary of the player’s stats is displayed.

5. Check Abrupt End Conditions: If certain thresholds are crossed, the simulation may end early. If the simulation reaches Day 7, a final survival report is produced.

DAILY ROUTINE:

Each day, the program presents the player with a menu of available activities. The player can choose up to two activities per day and each activity has a small chance of triggering an unfortunate event, representing the unpredictability of student life. Activities include:

1.   Study Event

Attend a Uni Class - Energy –10, Grades +15, Money -10.

10% chance you forget your assignment at home, so no grade boost that day.

All-Nighter Study Grind - Energy –40, Grades +30, Happiness –20

5% chance of catching a cold from late-night study, lose 10 more energy.

2.  Work Event

Part-time Shift - Energy –20, Money +50

10% chance your bicycle tire pops on the way, you miss work (no money earned).

Overtime Shift (Extra Work Hours) - Energy –35, Money +100, Happiness –15

5% chance of a workplace mishap (like spilling coffee on a customer), lose 10 more Happiness.

3.   Social Event

Hangout with friends – Energy -20, Happiness +30, Money -30

5% chance you lose your wallet, lose 30 more Money.

Throw a Party - Energy –50, Happiness +50, Money –100

10% chance of a massive hangover, lose 10 more Energy.

4.   Self-care Event

Netflix Binge / Doom Scroll TikTok - Grades –25, Happiness +15 10% chance you “doomscroll” too long, Grades –5 extra.

Gym/Meditation - Energy +15, Happiness +10

5% chance gym is closed / class cancelled, waste the activity, no stat boost.

5. Skip the day (Do nothing) - Energy +15 (rested), Grades –15, Happiness –15

But beware: if you push too hard, your student may outright crash. A crash happens when Energy or

Happiness are completely drained. On crash days, your student is forced into bed, losing out on productivity while their stats freefall (Energy +10, Grades – 10, Happiness -10, Money -10). Every skipped or crashed day is recorded and will appear in your final survival report.

The program should display a clear text-based menand validate the user’s input. If invalid input is entered,

the program should display an error message and re-prompt the user.

ABRUPT END CONDITIONS:

Stats never go below zero, but if you push them too far, life gets messy. The simulation normally runs for days, but the program must also check for early termination conditions. The simulation ends immediately if any of the following occur:

1. Burnout Condition

o  If you’re miserable (happiness <= 30) for three days in a row, you’ll burn out.

o  Output: "You burned out and couldn’t continue."

2. Academic Failure Condition

o  If you slack off on grades too long (grade <= 40 for 3 consecutive days), the uni will show you the door.

o  Output: "You failed your studies and were removed from uni."

3. Exhaustion Condition

o  If your energy runs dry (energy <= 0) for two straight days, you’ll collapse.

o  Output: "You collapsed from exhaustion and couldn’t continue."

4. Financial Crisis Condition

o  And if your bank account tanks past –100 (money <= -100), well, you can’t even afford ramen.

o  Output: "You went bankrupt and had to drop out."

If none of these disaster strike, you’ll make it to the end of the 7-day cycle and get a final survival report.

END OF SIMULATION:

At the end of the 7 days, all your choices — the late-night study marathons, the parties, the ramen-fuelled Netflix binges — are boiled down into one number: your Gen-Z Survival Score (GZSS). The GZSS is the average of your final stats: Energy, Money, Grades, and Happiness. This single number captures how well you balanced the chaos of uni life. Depending on your score, you’ll unlock one of several endings:

• GZSS >= 80 → Thriving Student

You crushed it. Your grades are strong, your energy is steady, your wallet isn’t crying, and you’re genuinely happy. Somehow, you figured out the mythical “work-life balance” everyone talks about.

• GZSS 60–79 → Balanced but Tired

You made it through the week in one piece, but not without trade-offs. Maybe your grades are solid,  but your happiness dipped, or maybe you worked too many shifts and ran out of energy. You survived — but you need a nap.

• GZSS 40–59 → Hanging by a Thread

You scraped through the week, but just barely. Two-minute noodles and instant coffee were your closest friends. Uni life didn’t break you … but it bent you.

• GZSS 20–39 → Burned Out

The week chewed you up and spat you out. Your stats show a student who tried but couldn’t balance the grind. Whether it was stress, money, or exhaustion — you didn’t cope well.

• GZSS <= 19 → Gen-Z Disaster

Rock bottom. You ended the week with nothing left in the tank. Grades, energy, happiness, money — all drained. Better luck next semester (and maybe fewer TikTok binges).

final report is printed with:

•      Total events attended

•      Types of events attended

•      Final stats (Energy, Money, Grades, Happiness)

•     Days skipped

•     Days crashed

•      Outcome

CLASS DESIGN:

Your program must include at least the following classes:

•      Student (fields: id, name, energy, money, grades, happiness, status)

•      Event (fields: type, stat effects, status)

•      Simulator (runs the 7-day loop, manages daily events, applies rules)

•      GenZLifeSimulator (the main class containing main())

You must make use of both Arrays and ArrayLists in your program.

CODE MARKING RUBRIC:

Code design, correctness and extra functionality

1. Program Functionality (up to 20 marks)

 Performing all functionality as per the specification.

2. Design Requirements (up to 20 marks)

 Sensible overall class design and adherence to good design principles

 Modularisation of complex tasks within classes

 Validation checks on user input

 Appropriate and correct use of inheritance (including abstract)

 Appropriate and correct use of enum

3. Extra Functionality (up to 10 marks)

You should add your own additional functionality to your assignment to achieve the final 10/50 marks (i.e. to get to “HD” level). This is NOT defined... you choose what to add. It should demonstrate a more advanced level of understanding of Java and Object-Oriented Design. It should include:

 Functionality that demonstrates a more advanced use of programming control structures

 More advanced implementation of Object-Oriented Design principles

 Use of other built-in Java classes

4. Unit Coding Standards (deduction of up to 10 marks)

All code written should adhere to the guidelines set out in the FIT1051 Coding Standards. Up to 10 marks may be removed for not meeting the unit coding standards.

Please Note: Code must compile. Non-compiling submissions will receive an N.

Interview component:

You will be asked to demonstrate your program at an interview in Week 13/14, following the code submission date. You will be contacted by EMAIL to book an online interview time. The interview will be up to 15 minutes   in length and consist of 6 questions. You may be asked to explain your code, your program designs, to modify your code, to discuss your coding decisions, or to explain the any of the coding concepts taught in Weeks 1-12 that this Assessment covers. Not being able to explain key design decisions or important Java syntax may result in failing the assessment. Interviews will take place online via Zoom. You must have access to a stable internet connection and a working webcam, and your webcam must be switched on for the duration of the interview. It is your responsibility to make yourself available for an interview time. We will offer Week 13 interviews (SWOT-VAC) for those students who wish to have it then, but you must at least make yourself available during Week 14, and to attend your online interview on time. The interview is worth 50% of your assessment mark, and any student who does not attend an interview will receive a failing grade for the assignment. Your interview must take place before the end of Week 14. If you cannot attend your interview or miss your scheduled time, you MUST apply for Special Consideration.

发表评论

电子邮件地址不会被公开。 必填项已用*标注